From 6e56a959c54a08645aeff513bccb2f6ca1d21b94 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 6 Sep 2022 16:35:15 +0200 Subject: [PATCH 01/12] chore: update dependencies --- package-lock.json | 1461 +++++++++++++++++++++++++++++---------------- package.json | 4 +- 2 files changed, 933 insertions(+), 532 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6015089..42e85f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "grunt-json-merge": "0.2.2", "grunt-karma": "4.0.2", "grunt-mocha-istanbul": "5.0.2", - "husky": "7.0.4", + "husky": "8.0.1", "istanbul": "0.4.5", "karma": "6.4.0", "karma-chai": "0.1.0", @@ -30,7 +30,7 @@ "karma-coverage": "2.2.0", "karma-mocha": "2.0.1", "karma-script-launcher": "1.0.0", - "lint-staged": "12.4.1", + "lint-staged": "13.0.3", "load-grunt-tasks": "5.1.0", "mocha": "10.0.0", "prettier": "2.7.1" @@ -62,30 +62,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", + "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", - "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", + "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helpers": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -116,12 +116,12 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.18.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", - "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.7", + "@babel/types": "^7.19.0", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -144,12 +144,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", - "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", + "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.18.6", + "@babel/compat-data": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" @@ -162,22 +162,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", - "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", - "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -208,19 +208,19 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz", - "integrity": "sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", "@babel/helper-simple-access": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.8", - "@babel/types": "^7.18.8" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -250,6 +250,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", @@ -269,14 +278,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", - "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", "dev": true, "dependencies": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -368,9 +377,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.8.tgz", - "integrity": "sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", + "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -380,33 +389,33 @@ } }, "node_modules/@babel/template": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", - "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.8.tgz", - "integrity": "sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", + "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.7", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.8", - "@babel/types": "^7.18.8", + "@babel/parser": "^7.19.0", + "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -424,11 +433,12 @@ } }, "node_modules/@babel/types": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.8.tgz", - "integrity": "sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "dev": true, "dependencies": { + "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", "to-fast-properties": "^2.0.0" }, @@ -446,14 +456,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -463,6 +473,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/argparse": { @@ -496,9 +509,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -509,6 +522,29 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -562,19 +598,54 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@types/component-emitter": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", - "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", "dev": true }, "node_modules/@types/cookie": { @@ -596,9 +667,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz", - "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==", + "version": "18.7.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", + "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==", "dev": true }, "node_modules/@ungap/promise-all-settled": { @@ -627,9 +698,9 @@ } }, "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1365,9 +1436,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", - "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", + "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", "dev": true, "funding": [ { @@ -1380,10 +1451,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001359", - "electron-to-chromium": "^1.4.172", - "node-releases": "^2.0.5", - "update-browserslist-db": "^1.0.4" + "caniuse-lite": "^1.0.30001370", + "electron-to-chromium": "^1.4.202", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.5" }, "bin": { "browserslist": "cli.js" @@ -1470,9 +1541,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001363", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", - "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", + "version": "1.0.30001390", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001390.tgz", + "integrity": "sha512-sS4CaUM+/+vqQUlCvCJ2WtDlV81aWtHhqeEVkLokVJJa3ViN4zDxAGfq9R8i1m90uGHxo99cy10Od+lvn3hf0g==", "dev": true, "funding": [ { @@ -1718,20 +1789,14 @@ } }, "node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", + "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", "dev": true, "engines": { - "node": ">= 12" + "node": "^12.20.0 || >=14" } }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1967,9 +2032,9 @@ } }, "node_modules/date-format": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", - "integrity": "sha512-VS20KRyorrbMCQmpdl2hg5KaOUsda1RbnsJg461FfrcyCUg+pkd0b40BSW4niQyTheww4DBXQnS7HwSrKkipLw==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.13.tgz", + "integrity": "sha512-bnYCwf8Emc3pTD8pXnre+wfnjGtfi5ncMDKy7+cWZXbmRAsdWkOQHrfC1yz/KiwP5thDp2kCHWYWKBX4HP1hoQ==", "dev": true, "engines": { "node": ">=4.0" @@ -2164,6 +2229,18 @@ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2236,9 +2313,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.185", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.185.tgz", - "integrity": "sha512-9kV/isoOGpKkBt04yYNaSWIBn3187Q5VZRtoReq8oz5NY/A4XmU6cAoqgQlDp7kKJCZMRjWZ8nsQyxfpFHvfyw==", + "version": "1.4.242", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.242.tgz", + "integrity": "sha512-nPdgMWtjjWGCtreW/2adkrB2jyHjClo9PtVhR6rW+oxa4E4Wom642Tn+5LslHP3XPL5MCpkn5/UEY60EXylNeQ==", "dev": true }, "node_modules/elliptic": { @@ -2323,16 +2400,16 @@ } }, "node_modules/es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", + "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", @@ -2344,9 +2421,9 @@ "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", @@ -2499,13 +2576,15 @@ } }, "node_modules/eslint": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", - "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2515,14 +2594,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -2537,8 +2619,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -2630,17 +2711,20 @@ } }, "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "dependencies": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -2730,23 +2814,23 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.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" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" @@ -2794,6 +2878,34 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2812,6 +2924,15 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", "dev": true }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -3009,9 +3130,9 @@ } }, "node_modules/flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "node_modules/follow-redirects": { @@ -3088,17 +3209,17 @@ } }, "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">=12" + "node": ">=6 <7 || >=8" } }, "node_modules/fs.realpath": { @@ -3340,9 +3461,9 @@ } }, "node_modules/globals": { - "version": "13.16.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", - "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3354,6 +3475,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "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/globule": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", @@ -3374,6 +3515,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/grunt": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", @@ -3947,24 +4094,24 @@ "dev": true }, "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">=12.20.0" } }, "node_modules/husky": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", - "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true, "bin": { "husky": "lib/bin.js" }, "engines": { - "node": ">=12" + "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/typicode" @@ -4205,9 +4352,9 @@ } }, "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -4377,12 +4524,12 @@ } }, "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4616,9 +4763,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4788,13 +4935,10 @@ } }, "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -5040,57 +5184,44 @@ } }, "node_modules/lilconfig": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz", - "integrity": "sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/lint-staged": { - "version": "12.4.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.4.1.tgz", - "integrity": "sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", - "colorette": "^2.0.16", - "commander": "^8.3.0", - "debug": "^4.3.3", - "execa": "^5.1.1", - "lilconfig": "2.0.4", - "listr2": "^4.0.1", - "micromatch": "^4.0.4", + "colorette": "^2.0.17", + "commander": "^9.3.0", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.5", + "listr2": "^4.0.5", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", - "object-inspect": "^1.12.0", - "pidtree": "^0.5.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", "string-argv": "^0.3.1", - "supports-color": "^9.2.1", - "yaml": "^1.10.2" + "yaml": "^2.1.1" }, "bin": { "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": "^14.13.1 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/lint-staged" } }, - "node_modules/lint-staged/node_modules/supports-color": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.2.tgz", - "integrity": "sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/listr2": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", @@ -5338,16 +5469,16 @@ } }, "node_modules/log4js": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.0.tgz", - "integrity": "sha512-3v8R7fd45UB6THucSht6wN2/7AZEruQbXdjygPZcxt5TA/msO6si9CN5MefUuKXbYnJHTBnYcx4famwcyQd+sA==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.1.tgz", + "integrity": "sha512-J8VYFH2UQq/xucdNu71io4Fo+purYYudyErgBbswWKO0MC6QVOERRomt5su/z6d3RJSmLyTGmXl3Q/XjKCf+/A==", "dev": true, "dependencies": { - "date-format": "^4.0.11", + "date-format": "^4.0.13", "debug": "^4.3.4", - "flatted": "^3.2.5", + "flatted": "^3.2.6", "rfdc": "^1.3.0", - "streamroller": "^3.1.1" + "streamroller": "^3.1.2" }, "engines": { "node": ">=8.0" @@ -5442,6 +5573,15 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -5508,12 +5648,15 @@ } }, "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimalistic-assert": { @@ -5809,15 +5952,30 @@ } }, "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/oauth-sign": { @@ -5857,14 +6015,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -5936,15 +6094,15 @@ } }, "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6205,6 +6363,15 @@ "node": ">=0.10.0" } }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -6255,9 +6422,9 @@ } }, "node_modules/pidtree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.5.0.tgz", - "integrity": "sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true, "bin": { "pidtree": "bin/pidtree.js" @@ -6474,6 +6641,26 @@ "node": ">=0.4.x" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "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" + } + ] + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -6738,6 +6925,40 @@ "node": ">=8" } }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rfdc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", @@ -6769,10 +6990,33 @@ "inherits": "^2.0.1" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rxjs": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", - "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -6923,6 +7167,15 @@ } ] }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", @@ -6952,9 +7205,9 @@ } }, "node_modules/socket.io": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.1.tgz", - "integrity": "sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", + "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", "dev": true, "dependencies": { "accepts": "~1.3.4", @@ -6962,7 +7215,7 @@ "debug": "~4.3.2", "engine.io": "~6.2.0", "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.0.4" + "socket.io-parser": "~4.2.0" }, "engines": { "node": ">=10.0.0" @@ -6975,13 +7228,12 @@ "dev": true }, "node_modules/socket.io-parser": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", - "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", + "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", "dev": true, "dependencies": { - "@types/component-emitter": "^1.2.10", - "component-emitter": "~1.3.0", + "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" }, "engines": { @@ -7108,14 +7360,14 @@ } }, "node_modules/streamroller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.1.tgz", - "integrity": "sha512-iPhtd9unZ6zKdWgMeYGfSBuqCngyJy1B/GPi/lTpwGpa3bajuX30GjUVd0/Tn/Xhg0mr4DOSENozz9Y06qyonQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.2.tgz", + "integrity": "sha512-wZswqzbgGGsXYIrBYhOE0yP+nQ6XRk7xDcYwuQAGTYXdyAUmvgVFE0YU1g5pvQT0m7GBaQfYcSnlHbapuK0H0A==", "dev": true, "dependencies": { - "date-format": "^4.0.10", + "date-format": "^4.0.13", "debug": "^4.3.4", - "fs-extra": "^10.1.0" + "fs-extra": "^8.1.0" }, "engines": { "node": ">=8.0" @@ -7230,12 +7482,15 @@ } }, "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-json-comments": { @@ -7515,9 +7770,9 @@ } }, "node_modules/uglify-js": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.2.tgz", - "integrity": "sha512-AaQNokTNgExWrkEYA24BTNMSjyqEXPSfhqoS0AxmHkCJ4U+Dyy5AvbGV/sqxuxficEfGGoX3zWw9R7QpLFfEsg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", + "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==", "dev": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -7607,12 +7862,12 @@ "dev": true }, "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, "engines": { - "node": ">= 10.0.0" + "node": ">= 4.0.0" } }, "node_modules/unpipe": { @@ -7625,9 +7880,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz", + "integrity": "sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==", "dev": true, "funding": [ { @@ -7732,12 +7987,6 @@ "uuid": "bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/v8flags": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", @@ -8025,12 +8274,12 @@ } }, "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", + "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", "dev": true, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/yargs": { @@ -8138,27 +8387,27 @@ } }, "@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", + "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", "dev": true }, "@babel/core": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz", - "integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", + "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.6", - "@babel/helper-compilation-targets": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helpers": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-compilation-targets": "^7.19.0", + "@babel/helper-module-transforms": "^7.19.0", + "@babel/helpers": "^7.19.0", + "@babel/parser": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -8184,12 +8433,12 @@ } }, "@babel/generator": { - "version": "7.18.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", - "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", + "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", "dev": true, "requires": { - "@babel/types": "^7.18.7", + "@babel/types": "^7.19.0", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -8208,31 +8457,31 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", - "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", + "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", "dev": true, "requires": { - "@babel/compat-data": "^7.18.6", + "@babel/compat-data": "^7.19.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" } }, "@babel/helper-environment-visitor": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", - "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", "dev": true }, "@babel/helper-function-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", - "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", "dev": true, "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" } }, "@babel/helper-hoist-variables": { @@ -8254,19 +8503,19 @@ } }, "@babel/helper-module-transforms": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz", - "integrity": "sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", + "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", "@babel/helper-simple-access": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.8", - "@babel/types": "^7.18.8" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/helper-simple-access": { @@ -8287,6 +8536,12 @@ "@babel/types": "^7.18.6" } }, + "@babel/helper-string-parser": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", + "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "dev": true + }, "@babel/helper-validator-identifier": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", @@ -8300,14 +8555,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", - "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", + "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", "dev": true, "requires": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.19.0", + "@babel/types": "^7.19.0" } }, "@babel/highlight": { @@ -8380,36 +8635,36 @@ } }, "@babel/parser": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.8.tgz", - "integrity": "sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", + "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", "dev": true }, "@babel/template": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", - "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.6", - "@babel/types": "^7.18.6" + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" } }, "@babel/traverse": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.8.tgz", - "integrity": "sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", + "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.7", - "@babel/helper-environment-visitor": "^7.18.6", - "@babel/helper-function-name": "^7.18.6", + "@babel/generator": "^7.19.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.8", - "@babel/types": "^7.18.8", + "@babel/parser": "^7.19.0", + "@babel/types": "^7.19.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -8423,11 +8678,12 @@ } }, "@babel/types": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.8.tgz", - "integrity": "sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", + "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", "dev": true, "requires": { + "@babel/helper-string-parser": "^7.18.10", "@babel/helper-validator-identifier": "^7.18.6", "to-fast-properties": "^2.0.0" } @@ -8439,14 +8695,14 @@ "dev": true }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -8482,9 +8738,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", - "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -8492,6 +8748,18 @@ "minimatch": "^3.0.4" } }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -8533,19 +8801,45 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", + "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@types/component-emitter": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.11.tgz", - "integrity": "sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ==", + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", "dev": true }, "@types/cookie": { @@ -8567,9 +8861,9 @@ "dev": true }, "@types/node": { - "version": "18.0.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz", - "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==", + "version": "18.7.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", + "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==", "dev": true }, "@ungap/promise-all-settled": { @@ -8595,9 +8889,9 @@ } }, "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true }, "acorn-jsx": { @@ -9205,15 +9499,15 @@ } }, "browserslist": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", - "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", + "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001359", - "electron-to-chromium": "^1.4.172", - "node-releases": "^2.0.5", - "update-browserslist-db": "^1.0.4" + "caniuse-lite": "^1.0.30001370", + "electron-to-chromium": "^1.4.202", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.5" } }, "buffer": { @@ -9279,9 +9573,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001363", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", - "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", + "version": "1.0.30001390", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001390.tgz", + "integrity": "sha512-sS4CaUM+/+vqQUlCvCJ2WtDlV81aWtHhqeEVkLokVJJa3ViN4zDxAGfq9R8i1m90uGHxo99cy10Od+lvn3hf0g==", "dev": true }, "caseless": { @@ -9468,15 +9762,9 @@ } }, "commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", + "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", "dev": true }, "concat-map": { @@ -9688,9 +9976,9 @@ } }, "date-format": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", - "integrity": "sha512-VS20KRyorrbMCQmpdl2hg5KaOUsda1RbnsJg461FfrcyCUg+pkd0b40BSW4niQyTheww4DBXQnS7HwSrKkipLw==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.13.tgz", + "integrity": "sha512-bnYCwf8Emc3pTD8pXnre+wfnjGtfi5ncMDKy7+cWZXbmRAsdWkOQHrfC1yz/KiwP5thDp2kCHWYWKBX4HP1hoQ==", "dev": true }, "dateformat": { @@ -9833,6 +10121,15 @@ } } }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -9898,9 +10195,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.185", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.185.tgz", - "integrity": "sha512-9kV/isoOGpKkBt04yYNaSWIBn3187Q5VZRtoReq8oz5NY/A4XmU6cAoqgQlDp7kKJCZMRjWZ8nsQyxfpFHvfyw==", + "version": "1.4.242", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.242.tgz", + "integrity": "sha512-nPdgMWtjjWGCtreW/2adkrB2jyHjClo9PtVhR6rW+oxa4E4Wom642Tn+5LslHP3XPL5MCpkn5/UEY60EXylNeQ==", "dev": true }, "elliptic": { @@ -9978,16 +10275,16 @@ } }, "es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", + "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", + "get-intrinsic": "^1.1.2", "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", @@ -9999,9 +10296,9 @@ "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.12.2", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", + "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "string.prototype.trimend": "^1.0.5", "string.prototype.trimstart": "^1.0.5", @@ -10108,13 +10405,15 @@ } }, "eslint": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", - "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -10124,14 +10423,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -10146,8 +10448,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { "argparse": { @@ -10210,12 +10511,12 @@ "dev": true }, "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "requires": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } @@ -10285,20 +10586,20 @@ } }, "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", "dev": true, "requires": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.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" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" } }, "exit": { @@ -10334,6 +10635,30 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", + "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "dev": true, + "requires": { + "@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" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -10352,6 +10677,15 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", "dev": true }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -10507,9 +10841,9 @@ } }, "flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "follow-redirects": { @@ -10560,14 +10894,14 @@ } }, "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "requires": { "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs.realpath": { @@ -10747,14 +11081,28 @@ } }, "globals": { - "version": "13.16.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", - "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "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" + } + }, "globule": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", @@ -10772,6 +11120,12 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "grunt": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", @@ -11209,15 +11563,15 @@ "dev": true }, "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true }, "husky": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", - "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true }, "iconv-lite": { @@ -11390,9 +11744,9 @@ "dev": true }, "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "requires": { "has": "^1.0.3" @@ -11502,9 +11856,9 @@ } }, "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true }, "is-string": { @@ -11736,9 +12090,9 @@ } }, "istanbul-reports": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", - "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -11812,13 +12166,12 @@ "dev": true }, "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" + "graceful-fs": "^4.1.6" } }, "jsonparse": { @@ -12018,39 +12371,30 @@ } }, "lilconfig": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz", - "integrity": "sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true }, "lint-staged": { - "version": "12.4.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.4.1.tgz", - "integrity": "sha512-PTXgzpflrQ+pODQTG116QNB+Q6uUTDg5B5HqGvNhoQSGt8Qy+MA/6zSnR8n38+sxP5TapzeQGTvoKni0KRS8Vg==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", "dev": true, "requires": { "cli-truncate": "^3.1.0", - "colorette": "^2.0.16", - "commander": "^8.3.0", - "debug": "^4.3.3", - "execa": "^5.1.1", - "lilconfig": "2.0.4", - "listr2": "^4.0.1", - "micromatch": "^4.0.4", + "colorette": "^2.0.17", + "commander": "^9.3.0", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.5", + "listr2": "^4.0.5", + "micromatch": "^4.0.5", "normalize-path": "^3.0.0", - "object-inspect": "^1.12.0", - "pidtree": "^0.5.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", "string-argv": "^0.3.1", - "supports-color": "^9.2.1", - "yaml": "^1.10.2" - }, - "dependencies": { - "supports-color": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.2.2.tgz", - "integrity": "sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==", - "dev": true - } + "yaml": "^2.1.1" } }, "listr2": { @@ -12236,16 +12580,16 @@ } }, "log4js": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.0.tgz", - "integrity": "sha512-3v8R7fd45UB6THucSht6wN2/7AZEruQbXdjygPZcxt5TA/msO6si9CN5MefUuKXbYnJHTBnYcx4famwcyQd+sA==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.1.tgz", + "integrity": "sha512-J8VYFH2UQq/xucdNu71io4Fo+purYYudyErgBbswWKO0MC6QVOERRomt5su/z6d3RJSmLyTGmXl3Q/XjKCf+/A==", "dev": true, "requires": { - "date-format": "^4.0.11", + "date-format": "^4.0.13", "debug": "^4.3.4", - "flatted": "^3.2.5", + "flatted": "^3.2.6", "rfdc": "^1.3.0", - "streamroller": "^3.1.1" + "streamroller": "^3.1.2" } }, "loupe": { @@ -12316,6 +12660,12 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -12366,9 +12716,9 @@ } }, "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true }, "minimalistic-assert": { @@ -12605,12 +12955,20 @@ "dev": true }, "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, "requires": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" + }, + "dependencies": { + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + } } }, "oauth-sign": { @@ -12638,14 +12996,14 @@ "dev": true }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, @@ -12699,12 +13057,12 @@ } }, "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "requires": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" } }, "optionator": { @@ -12902,6 +13260,12 @@ "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "pathval": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", @@ -12940,9 +13304,9 @@ "dev": true }, "pidtree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.5.0.tgz", - "integrity": "sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true }, "pify": { @@ -13096,6 +13460,12 @@ "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -13309,8 +13679,31 @@ "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + } } }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rfdc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", @@ -13336,10 +13729,19 @@ "inherits": "^2.0.1" } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "rxjs": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", - "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", + "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -13447,6 +13849,12 @@ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", @@ -13466,9 +13874,9 @@ } }, "socket.io": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.1.tgz", - "integrity": "sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", + "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", "dev": true, "requires": { "accepts": "~1.3.4", @@ -13476,7 +13884,7 @@ "debug": "~4.3.2", "engine.io": "~6.2.0", "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.0.4" + "socket.io-parser": "~4.2.0" } }, "socket.io-adapter": { @@ -13486,13 +13894,12 @@ "dev": true }, "socket.io-parser": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz", - "integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", + "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", "dev": true, "requires": { - "@types/component-emitter": "^1.2.10", - "component-emitter": "~1.3.0", + "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" } }, @@ -13600,14 +14007,14 @@ } }, "streamroller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.1.tgz", - "integrity": "sha512-iPhtd9unZ6zKdWgMeYGfSBuqCngyJy1B/GPi/lTpwGpa3bajuX30GjUVd0/Tn/Xhg0mr4DOSENozz9Y06qyonQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.2.tgz", + "integrity": "sha512-wZswqzbgGGsXYIrBYhOE0yP+nQ6XRk7xDcYwuQAGTYXdyAUmvgVFE0YU1g5pvQT0m7GBaQfYcSnlHbapuK0H0A==", "dev": true, "requires": { - "date-format": "^4.0.10", + "date-format": "^4.0.13", "debug": "^4.3.4", - "fs-extra": "^10.1.0" + "fs-extra": "^8.1.0" } }, "string_decoder": { @@ -13691,9 +14098,9 @@ } }, "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true }, "strip-json-comments": { @@ -13910,9 +14317,9 @@ "dev": true }, "uglify-js": { - "version": "3.16.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.2.tgz", - "integrity": "sha512-AaQNokTNgExWrkEYA24BTNMSjyqEXPSfhqoS0AxmHkCJ4U+Dyy5AvbGV/sqxuxficEfGGoX3zWw9R7QpLFfEsg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", + "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==", "dev": true }, "umd": { @@ -13983,9 +14390,9 @@ } }, "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, "unpipe": { @@ -13995,9 +14402,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", - "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz", + "integrity": "sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -14077,12 +14484,6 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8flags": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", @@ -14299,9 +14700,9 @@ "dev": true }, "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", + "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index fc7a693..9c64d29 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "grunt-json-merge": "0.2.2", "grunt-karma": "4.0.2", "grunt-mocha-istanbul": "5.0.2", - "husky": "7.0.4", + "husky": "8.0.1", "istanbul": "0.4.5", "karma": "6.4.0", "karma-chai": "0.1.0", @@ -60,7 +60,7 @@ "karma-coverage": "2.2.0", "karma-mocha": "2.0.1", "karma-script-launcher": "1.0.0", - "lint-staged": "12.4.1", + "lint-staged": "13.0.3", "load-grunt-tasks": "5.1.0", "mocha": "10.0.0", "prettier": "2.7.1" From fb222359b4088978e703f99ddd0f4bedbdfa7744 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Mon, 31 Oct 2022 17:51:58 +0100 Subject: [PATCH 02/12] feat: ES module compatibility --- .eslintrc | 73 +- .github/ISSUE_TEMPLATE/bug_report.md | 18 +- .github/ISSUE_TEMPLATE/feature_request.md | 1 - .github/workflows/node.js.yml | 25 +- .gitignore | 3 - .lintstagedrc | 5 +- .npmignore | 8 +- .prettierrc | 3 +- .vscode/launch.json | 14 + .vscode/settings.json | 4 + CODE_OF_CONDUCT.md | 60 +- CONTRIBUTING.md | 12 +- Gruntfile.cjs | 38 + Gruntfile.js | 77 - README.md | 127 +- addons/README.md | 2 +- cypress.config.js | 29 + cypress/e2e/component.cy.js | 803 ++ cypress/e2e/database.cy.js | 8 + cypress/e2e/history.cy.js | 197 + cypress/e2e/metamodel.cy.js | 594 + cypress/e2e/mson.cy.js | 115 + cypress/e2e/runtime.cy.js | 101 + cypress/e2e/system.cy.js | 48 + cypress/support/e2e.js | 0 dist/system-runtime.js | 21 + dist/system-runtime.js.map | 1 + example/index.html | 71 + example/module.js | 3 + example/test.js | 184 + extensions/README.md | 10 +- extensions/mode-admin-server.json | 456 +- extensions/mode-admin.json | 551 +- extensions/mode-dev.json | 22 +- extensions/storage.json | 103 +- karma.conf.js | 71 - package-lock.json | 13136 ++++++-------------- package.json | 42 +- rollup.config.js | 31 + src/banners/systemmodule-footer.txt | 2 +- src/banners/systemmodule-header.txt | 9 +- src/behavior.js | 273 +- src/component.js | 1312 +- src/db.js | 798 +- src/helper.js | 106 +- src/history.js | 227 +- src/log.js | 622 +- src/metamodel.js | 1745 +-- src/mson.js | 66 +- src/runtime.js | 48 +- src/state.js | 29 +- src/system.js | 1382 ++ src/system/README.md | 12 +- src/system/system-runtime.json | 26 +- src/workflow.js | 594 +- tasks/browserify.json | 25 - tasks/clean.json | 9 +- tasks/concat.json | 8 +- tasks/eslint.json | 9 - tasks/json_merge.json | 7 +- tasks/karma.json | 5 - tasks/mocha_istanbul.json | 30 - tasks/uglify.json | 9 - tasks/watch.json | 15 - test/component-spec.js | 807 ++ test/database-spec.js | 10 + test/db-spec.js | 364 + test/history-spec.js | 198 + test/metamodel-spec.js | 593 + test/module/db-spec.js | 338 - test/module/test.js | 3 + test/mson-spec.js | 117 + test/runtime-spec.js | 102 + test/runtime/component-spec.js | 820 -- test/runtime/database-spec.js | 14 - test/runtime/history-spec.js | 182 - test/runtime/metamodel-spec.js | 602 - test/runtime/mson-spec.js | 120 - test/runtime/runtime-spec.js | 108 - test/runtime/system-spec.js | 51 - test/system-spec.js | 49 + 81 files changed, 14135 insertions(+), 14778 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 Gruntfile.cjs delete mode 100644 Gruntfile.js create mode 100644 cypress.config.js create mode 100644 cypress/e2e/component.cy.js create mode 100644 cypress/e2e/database.cy.js create mode 100644 cypress/e2e/history.cy.js create mode 100644 cypress/e2e/metamodel.cy.js create mode 100644 cypress/e2e/mson.cy.js create mode 100644 cypress/e2e/runtime.cy.js create mode 100644 cypress/e2e/system.cy.js create mode 100644 cypress/support/e2e.js create mode 100644 dist/system-runtime.js create mode 100644 dist/system-runtime.js.map create mode 100644 example/index.html create mode 100644 example/module.js create mode 100644 example/test.js delete mode 100644 karma.conf.js create mode 100644 rollup.config.js create mode 100644 src/system.js delete mode 100644 tasks/browserify.json delete mode 100644 tasks/eslint.json delete mode 100644 tasks/karma.json delete mode 100644 tasks/mocha_istanbul.json delete mode 100644 tasks/uglify.json delete mode 100644 tasks/watch.json create mode 100644 test/component-spec.js create mode 100644 test/database-spec.js create mode 100644 test/db-spec.js create mode 100644 test/history-spec.js create mode 100644 test/metamodel-spec.js delete mode 100644 test/module/db-spec.js create mode 100644 test/module/test.js create mode 100644 test/mson-spec.js create mode 100644 test/runtime-spec.js delete mode 100644 test/runtime/component-spec.js delete mode 100644 test/runtime/database-spec.js delete mode 100644 test/runtime/history-spec.js delete mode 100644 test/runtime/metamodel-spec.js delete mode 100644 test/runtime/mson-spec.js delete mode 100644 test/runtime/runtime-spec.js delete mode 100644 test/runtime/system-spec.js create mode 100644 test/system-spec.js diff --git a/.eslintrc b/.eslintrc index 895fd29..3a020b9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,63 +1,20 @@ { - "root": true, - "parserOptions": { - "ecmaVersion": 6 - }, + "extends": [ + "eslint:recommended", + "plugin:mocha/recommended" + ], "env": { - "node": true + "browser": true, + "node": true, + "es6": true }, - "rules": { - "no-new-object": 1, - "no-array-constructor": 1, - "array-callback-return": 1, - "one-var": ["warn", "never"], - "indent": ["warn", 2, { "SwitchCase": 1 }], - "wrap-iife": 1, - "no-loop-func": 1, - "no-duplicate-imports": 1, - "dot-notation": 1, - "no-restricted-properties": 1, - "no-undef": 1, - "no-multi-assign": 1, - "eqeqeq": 1, - "no-case-declarations": 1, - "no-nested-ternary": 1, - "no-unneeded-ternary": 1, - "nonblock-statement-body-position": 1, - "brace-style": 1, - "spaced-comment": 1, - "space-before-blocks": 1, - "keyword-spacing": 1, - "space-infix-ops": 1, - "eol-last": 1, - "newline-per-chained-call": 0, - "no-whitespace-before-property": 1, - "space-in-parens": 1, - "array-bracket-spacing": 1, - "object-curly-spacing": 1, - "comma-style": 1, - "comma-dangle": 0, - "semi": 1, - "no-new-wrappers": 1, - "radix": 1, - "camelcase": 1, - "new-cap": 1, - "no-restricted-globals": 1 + "globals": { + "expect": true }, - "overrides": [ - { - "files": ["*-spec.js"], - "rules": { - "no-undef": 0, - "indent": 0, - "newline-per-chained-call": 0 - } - }, - { - "files": ["Gruntfile.js"], - "rules": { - "camelcase": 0 - } - } - ] + "parserOptions": { + "sourceType": "module" + }, + "rules": { + "no-prototype-builtins": 0 + } } \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 00dd334..fea7cf7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve System Runtime title: '' labels: '' assignees: '' - --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] + +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index dc4d1c3..d922847 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,7 +4,6 @@ about: Suggest an idea for System Runtime title: '' labels: '' assignees: '' - --- **Is your feature request related to a problem? Please describe.** diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 03354f3..24cc45f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,25 +5,24 @@ name: unit tests on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: build: - runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] - + node-version: [18.x] + steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - run: npm test + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build + - run: npm test diff --git a/.gitignore b/.gitignore index 7a42239..b03a68e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -/.vscode/ /build/ -/coverage/ -/dist/ /node_modules/ *.log .DS_Store \ No newline at end of file diff --git a/.lintstagedrc b/.lintstagedrc index 03874e8..38bc950 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,10 +1,11 @@ { "src/*.js": [ - "prettier --single-quote --write", + "npm run lint", + "npm run prettier", "git add" ], "src/system/*.json": [ - "prettier --single-quote --write", + "npm run prettier", "git add" ] } diff --git a/.npmignore b/.npmignore index 9e06e30..4bde5d2 100644 --- a/.npmignore +++ b/.npmignore @@ -1,9 +1,8 @@ /.github/ /.husky/ /.vscode/ -/build/system-runtime.json -/coverage/ -/dist/system-runtime.js +/build/ +/cypress/ /src/banners/ /src/system/ /tasks/ @@ -15,8 +14,9 @@ .prettierrc CODE_OF_CONDUCT.md CONTRIBUTING.md +cypress.config.js Gruntfile.js -karma.conf.js package-lock.json +rollup.config.js *.log .DS_Store \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 544138b..fd496a8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,3 +1,4 @@ { - "singleQuote": true + "singleQuote": true, + "semi": false } diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..c899ace --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/example/test.js" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..95c6938 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.formatOnSave": true, + "editor.tabSize": 2 +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7e667f2..4e3e8bf 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -4,45 +4,45 @@ This code of conduct outlines our expectations for participants within the Syste Our open source community strives to: -* **Be friendly and patient**. +- **Be friendly and patient**. -* **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. +- **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. -* **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. +- **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language. -* **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. +- **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. -* **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. +- **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable. -* **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. +- **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. ## Definitions Harassment includes, but is not limited to: -* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, age, regional discrimination, political or religious affiliation -* Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment -* Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person’s gender identity. You must address people by the name they give you when not addressing them by their username or handle -* Physical contact and simulated physical contact (eg, textual descriptions like “hug” or “backrub”) without consent or after a request to stop -* Threats of violence, both physical and psychological -* Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm -* Deliberate intimidation -* Stalking or following -* Harassing photography or recording, including logging online activity for harassment purposes -* Sustained disruption of discussion -* Unwelcome sexual attention, including gratuitous or off-topic sexual images or behaviour -* Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others -* Continued one-on-one communication after requests to cease -* Deliberate “outing” of any aspect of a person’s identity without their consent except as necessary to protect others from intentional abuse -* Publication of non-harassing private communication +- Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, age, regional discrimination, political or religious affiliation +- Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment +- Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person’s gender identity. You must address people by the name they give you when not addressing them by their username or handle +- Physical contact and simulated physical contact (eg, textual descriptions like “hug” or “backrub”) without consent or after a request to stop +- Threats of violence, both physical and psychological +- Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm +- Deliberate intimidation +- Stalking or following +- Harassing photography or recording, including logging online activity for harassment purposes +- Sustained disruption of discussion +- Unwelcome sexual attention, including gratuitous or off-topic sexual images or behaviour +- Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others +- Continued one-on-one communication after requests to cease +- Deliberate “outing” of any aspect of a person’s identity without their consent except as necessary to protect others from intentional abuse +- Publication of non-harassing private communication Our open source community prioritizes marginalized people’s safety over privileged people’s comfort. We will not act on complaints regarding: -* ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’ -* Reasonable communication of boundaries, such as “leave me alone,” “go away,” or “I’m not discussing this with you” -* Refusal to explain or debate social justice concepts -* Communicating in a ‘tone’ you don’t find congenial -* Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions +- ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’ +- Reasonable communication of boundaries, such as “leave me alone,” “go away,” or “I’m not discussing this with you” +- Refusal to explain or debate social justice concepts +- Communicating in a ‘tone’ you don’t find congenial +- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions ## Diversity Statement @@ -54,10 +54,10 @@ Although this list cannot be exhaustive, we explicitly honor diversity in age, g If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting us via [erwan.carriou@mac.com](mailto:erwan.carriou@mac.com). All reports will be handled with discretion. In your report please include: -* Your contact information. -* Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. -* Any additional information that may be helpful. +- Your contact information. +- Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. +- Any additional information that may be helpful. After filing a report, a representative will contact you personally, review the incident, follow up with any additional questions, and make a decision as to how to respond. If the person who is harassing you is part of the response team, they will recuse themselves from handling your incident. If the complaint originates from a member of the response team, it will be handled by a different member of the response team. We will respect confidentiality requests for the purpose of protecting victims of abuse. -note: this code of conduct is based on the [template](http://todogroup.org/opencodeofconduct/) established by the [TODO Group](http://todogroup.org) \ No newline at end of file +note: this code of conduct is based on the [template](http://todogroup.org/opencodeofconduct/) established by the [TODO Group](http://todogroup.org) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bcbc252..136fe6d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,12 +6,12 @@ Read the [documentation](https://designfirst.io/systemruntime/documentation/docs ## For issues -Give the following informations related to your problem: +Give the following informations related to your problem: -- [ ] System Runtime version number (ex: *v1.9.9*) -- [ ] If the problem occured client-side: your browser name and version (ex: *Safari Version 10.1.2*) -- [ ] If the problem occured server-side: Node version (ex: *v8.2.1*) -- [ ] You OS version (ex: *macOS 10.12.6*) +- [ ] System Runtime version number (ex: _v1.9.9_) +- [ ] If the problem occured client-side: your browser name and version (ex: _Safari Version 10.1.2_) +- [ ] If the problem occured server-side: Node version (ex: _v8.2.1_) +- [ ] You OS version (ex: _macOS 10.12.6_) - [ ] Steps to reproduce the problem ## For contributing to System Runtime codebase @@ -22,4 +22,4 @@ Follow these steps: 2. [Create an issue](https://github.com/design-first/system-runtime/issues) where you describe what you plan to do 3. Once the issue has been accepted, you can work on your branch for that issue 4. Once you have completed your task, create a pull request for a review. Remember that the build must succeed -5. Once review is done. The pull request will be merged \ No newline at end of file +5. Once review is done. The pull request will be merged diff --git a/Gruntfile.cjs b/Gruntfile.cjs new file mode 100644 index 0000000..3e2dc02 --- /dev/null +++ b/Gruntfile.cjs @@ -0,0 +1,38 @@ +/* + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +module.exports = (grunt) => { + // load tasks + require('load-grunt-tasks')(grunt) + + // init configuration + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + clean: grunt.file.readJSON('tasks/clean.json'), + concat: grunt.file.readJSON('tasks/concat.json'), + json_merge: grunt.file.readJSON('tasks/json_merge.json'), + }) + + // build system + grunt.registerTask('system', ['clean', 'json_merge', 'concat:system']) + + // add licence + grunt.registerTask('licence', ['concat:license']) +} diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index bb85a61..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - * System Runtime - * - * https://designfirst.io/systemruntime/ - * - * Copyright 2022 Erwan Carriou - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -module.exports = grunt => { - // load tasks - require('load-grunt-tasks')(grunt); - - // init configuration - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - watch: grunt.file.readJSON('tasks/watch.json'), - clean: grunt.file.readJSON('tasks/clean.json'), - eslint: grunt.file.readJSON('tasks/eslint.json'), - mocha_istanbul: grunt.file.readJSON('tasks/mocha_istanbul.json'), - karma: grunt.file.readJSON('tasks/karma.json'), - browserify: grunt.file.readJSON('tasks/browserify.json'), - uglify: grunt.file.readJSON('tasks/uglify.json'), - concat: grunt.file.readJSON('tasks/concat.json'), - json_merge: grunt.file.readJSON('tasks/json_merge.json') - }); - - // dev - grunt.registerTask('dev', [ - 'watch' - ]); - - // test - grunt.registerTask('test', [ - 'eslint', - 'mocha_istanbul:coverage', - 'karma:release' - ]); - - // build - grunt.registerTask('build', [ - 'clean', - 'json_merge', - 'concat:system', - 'browserify:debug', - 'browserify:release', - 'uglify:release', - 'concat:license' - ]); - - // coveralls - grunt.registerTask('coveralls', [ - 'mocha_istanbul:coveralls' - ]); - - if (process.env.TRAVIS) { - grunt.event.on('coverage', (lcov, done) => { - require('coveralls').handleInput(lcov, (err) => { - if (err) { - return done(err); - } - done(); - }); - }); - } -}; diff --git a/README.md b/README.md index 1097a6b..d743b74 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ System Runtime gives you the APIs to create the model, components and behaviors A system: -* is defined by a model, -* is composed by components and -* reacts to events with actions that we call behaviors. +- is defined by a model, +- is composed by components and +- reacts to events with actions that we call behaviors. ![Image Alt](https://designfirst.io/img/system.png) @@ -25,23 +25,24 @@ Use System Runtime APIs to create your system: ```js // create a system -const system = runtime.system('system'); +const system = runtime.system('system') // add some business logic in the start method -system.on('start', () => console.log('Hello world !')); +system.on('start', () => console.log('Hello world !')) // run the system -system.start(); +system.start() ``` Now you can bundle your system into a JSON object: ```js // create a bundle -runtime.bundle(); +runtime.bundle() ``` It will return this JSON: + ```json { "_id": "154cd18d0210516", @@ -71,19 +72,19 @@ Just add a link tag in your HTML to install and start your bundle: ```html - + ``` #### Install the bundle in Node.js -Just call *install* API to install and start your bundle: +Just call _install_ API to install and start your bundle: ```js // require System Runtime -const runtime = require('system-runtime'); +import runtime from 'system-runtime' -// install your bundle -runtime.install('system.json'); +// install your bundle +runtime.install('system.json') ``` ## How System runtime helps you to create your system ? @@ -95,18 +96,18 @@ Creating a system in System Runtime is very simple, you do not have to code but With [MSON](https://designfirst.io/systemruntime/documentation/docs/design-your-model.html#defining-your-model) you can define types, classes, one to one / one to many relationships and multi inheritance between classes. ```js -const metamodel = runtime.require('metamodel'); +const metamodel = runtime.require('metamodel') // create the Jedi schema metamodel.schema('Jedi', { - 'firstName': 'property', - 'lastName': 'property', - 'nickname': 'property', - 'father': 'link', - 'shout': 'method' -}); - -metamodel.create(); + firstName: 'property', + lastName: 'property', + nickname: 'property', + father: 'link', + shout: 'method', +}) + +metamodel.create() ``` #### Create your components @@ -117,27 +118,27 @@ Because you have defined a model for your system, a [Dynamic Type Check](https:/ ```js // get your component class -const Jedi = runtime.require('Jedi'); +const Jedi = runtime.require('Jedi') // create components const luke = new Jedi({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' -}); + firstName: 'Luke', + lastName: 'Skywalker', +}) const anakin = new Jedi({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' -}); + firstName: 'Anakin', + lastName: 'Skywalker', +}) // add a link -luke.father(anakin); +luke.father(anakin) // get the first name of luke father -luke.father().firstName(); +luke.father().firstName() ``` -#### Manage your components +#### Manage your components All your components are stored in System Runtime NoSQL Database. In fact, System Runtime acts as an ODM (Object-Document Mapper) to manage your components as NoSQL Documents. @@ -145,24 +146,27 @@ You can find, create, update, delete components like you do in a NoSQL Database. ```js // get a collection -const Jedi = runtime.require('db').collections().Jedi; +const Jedi = runtime.require('db').collections().Jedi // find components Jedi.find({ - 'firstName': 'Luke' -}); + firstName: 'Luke', +}) // update components -Jedi.update({ - 'firstName': 'Anakin' -},{ - 'nickname': 'Darth Vader' -}); +Jedi.update( + { + firstName: 'Anakin', + }, + { + nickname: 'Darth Vader', + } +) // remove components Jedi.remove({ - 'firstName': 'Anakin' -});; + firstName: 'Anakin', +}) ``` ## What contains System Runtime ? @@ -171,27 +175,27 @@ Jedi.remove({ #### A metamodel -System Runtime contains a metamodel to help you to design your model. The definition of the model is made on a JSON format called [MSON](https://designfirst.io/systemruntime/documentation/docs/design-your-model.html#defining-your-model), no code is needed. +System Runtime contains a metamodel to help you to design your model. The definition of the model is made on a JSON format called [MSON](https://designfirst.io/systemruntime/documentation/docs/design-your-model.html#defining-your-model), no code is needed. -With [MSON](https://designfirst.io/systemruntime/documentation/docs/design-your-model.html#defining-your-model) you can define types, classes, one to one / one to many relationships and multi inheritance between classes. +With [MSON](https://designfirst.io/systemruntime/documentation/docs/design-your-model.html#defining-your-model) you can define types, classes, one to one / one to many relationships and multi inheritance between classes. [MSON](https://designfirst.io/systemruntime/documentation/docs/design-your-model.html#defining-your-model) is based on [UML](http://uml.org), so learning it is very easy. #### A component factory -System Runtime uses the [Model-Driven Architecture](http://www.omg.org/mda/) approach to create classes based on your design. Use them to instantiate your components. +System Runtime uses the [Model-Driven Architecture](http://www.omg.org/mda/) approach to create classes based on your design. Use them to instantiate your components. #### A NoSQL Database -System Runtime acts as an ODM (Object-Document Mapper) to manage your components as NoSQL Documents. +System Runtime acts as an ODM (Object-Document Mapper) to manage your components as NoSQL Documents. -System Runtime has a micro NoSQL Database that stores your components and you can export/import them into another System Runtime NoSQL Database. +System Runtime has a micro NoSQL Database that stores your components and you can export/import them into another System Runtime NoSQL Database. Thanks to System Runtime NoSQL Database, you can compose your system with an another system. #### A workflow engine -System Runtime checks at runtime if the signatures of invoked methods are compliant with your model. +System Runtime checks at runtime if the signatures of invoked methods are compliant with your model. With System Runtime your components really behave the way you designed them. @@ -209,7 +213,7 @@ Once you have cloned the repository, install the dependencies: ```sh npm i -``` +``` #### Build @@ -217,32 +221,23 @@ Then build System Runtime: ```sh npm run build -``` +``` It will: -* build System Runtime core module for the server library and -* build System Runtime client library on **/dist** directory - -## Development - -To start System Runtime in development mode: - -```sh -npm run dev -``` -All the modifications to the source code of System Runtime will rebuild the project. +- build System Runtime core module for the server library and +- build System Runtime client library on **/dist** directory. ## Documentation -* [Quick Start](https://designfirst.io/systemruntime/documentation/docs/quick-start.html) -* [Guide](https://designfirst.io/systemruntime/documentation/docs/install-system-runtime.html) -* [Examples](https://designfirst.io/systemruntime/documentation/docs/a-basic-hello-world.html) +- [Quick Start](https://designfirst.io/systemruntime/documentation/docs/quick-start.html) +- [Guide](https://designfirst.io/systemruntime/documentation/docs/install-system-runtime.html) +- [Examples](https://designfirst.io/systemruntime/documentation/docs/a-basic-hello-world.html) ## Community -* [Code of Conduct](CODE_OF_CONDUCT.md) -* [Contributing Guidelines](CONTRIBUTING.md) +- [Code of Conduct](CODE_OF_CONDUCT.md) +- [Contributing Guidelines](CONTRIBUTING.md) ## License @@ -258,7 +253,7 @@ 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. +limitations under the License. **Do not use System Runtime if you do not believe in Equality and Diversity.** diff --git a/addons/README.md b/addons/README.md index d992c02..0247790 100644 --- a/addons/README.md +++ b/addons/README.md @@ -2,4 +2,4 @@ You can update System Runtime core system by composing other systems with it. In that case, these systems are called **addons**. -To compose a system with System Runtime core system, just copy and paste a system into the `/addons` directory and run `npm run build`. \ No newline at end of file +To compose a system with System Runtime core system, just copy and paste a system into the `/addons` directory and run `npm run build`. diff --git a/cypress.config.js b/cypress.config.js new file mode 100644 index 0000000..9150c17 --- /dev/null +++ b/cypress.config.js @@ -0,0 +1,29 @@ +/* + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from 'cypress' + +export default defineConfig({ + video: false, + screenshotOnRunFailure: false, + e2e: { + setupNodeEvents(on, config) {}, + }, +}) diff --git a/cypress/e2e/component.cy.js b/cypress/e2e/component.cy.js new file mode 100644 index 0000000..c5be9fa --- /dev/null +++ b/cypress/e2e/component.cy.js @@ -0,0 +1,803 @@ +import runtime from '../../dist/system-runtime.js' + +describe('a System Runtime component', function () { + beforeEach(function () { + runtime.require('logger').level('off') + + runtime.system('component-spec') + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + birthDate: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + location: 'property', + likes: 'property', + custom: 'property', + fullName: 'method', + testMethod: 'method', + children: 'collection', + teacher: 'link', + father: 'link', + moving: 'event', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + birthDate: { + type: 'date', + readOnly: false, + mandatory: false, + default: '1970-01-01T00:00:00.000Z', + }, + children: { + type: ['Person'], + readOnly: false, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + likes: { + type: 'array', + readOnly: false, + mandatory: false, + default: [], + }, + custom: { + type: 'mycustomType', + readOnly: false, + mandatory: false, + default: {}, + }, + fullName: { + result: 'string', + }, + testMethod: {}, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + teacher: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + address: { + type: 'string', + readOnly: false, + mandatory: false, + default: '', + }, + location: { + type: 'location', + readOnly: false, + mandatory: false, + default: {}, + }, + moving: {}, + }) + + metamodel.schema({ + _name: 'Teacher', + _inherit: ['Person'], + }) + + metamodel.type({ + name: 'mycustomType', + description: '', + type: 'object', + schema: { + property0: { + type: 'string', + mandatory: false, + default: '', + }, + property1: { + type: 'array', + mandatory: false, + default: [], + }, + property2: { + type: 'object', + mandatory: false, + default: {}, + }, + property3: { + type: 'any', + mandatory: false, + default: '', + }, + property4: { + type: 'boolean', + mandatory: false, + default: false, + }, + property5: { + type: 'date', + mandatory: false, + default: '', + }, + property6: { + type: 'json', + mandatory: false, + default: {}, + }, + }, + }) + + metamodel.type({ + name: 'street', + description: '', + type: 'object', + schema: { + street: { + type: 'string', + mandatory: false, + default: '', + }, + }, + }) + + metamodel.type({ + name: 'location', + description: '', + type: 'object', + schema: { + cities: { + type: ['street'], + mandatory: false, + default: [], + }, + }, + }) + + metamodel.create() + }) + + it('can show its id', function () { + const id = runtime.id() + + expect(id).equal('runtime') + }) + + it('can require a component', function () { + const db = runtime.require('db') + + expect(db).to.not.be.undefined + }) + + it('can add an event', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + yoda.on('moving', function () { + this.address('Dagobah') + }) + yoda.moving() + + setTimeout(function () { + expect(yoda.address()).equal('Dagobah') + done() + }, 10) + }) + + it('can add an event on a new context', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + const luke = new Person({ + firstName: 'Luke', + lastName: '', + likes: [], + }) + + yoda.on( + 'moving', + function () { + this.lastName('Skywalker') + }, + luke + ) + yoda.moving() + + setTimeout(function () { + expect(luke.lastName()).equal('Skywalker') + done() + }, 10) + }) + + it('can remove an event', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('moving', function () { + this.address('Dagobah') + }) + yoda.off('moving') + + yoda.moving() + + setTimeout(function () { + expect(yoda.address()).equal('') + done() + }, 1) + }) + + it('can remove all event', function (done) { + const Person = runtime.require('Person') + const yoda2 = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda2.on('moving', function () { + this.address('Dagobah') + }) + yoda2.off() + + yoda2.moving() + + setTimeout(function () { + expect(yoda2.address()).equal('') + done() + }, 1) + }) + + it('can remove an event with its id', function (done) { + const Person = runtime.require('Person') + const yoda3 = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + const behaviorId = yoda3.on('moving', function () { + this.address('Dagobah') + }) + + yoda3.require(behaviorId).destroy() + + yoda3.moving() + + setTimeout(function () { + expect(yoda3.address()).equal('') + done() + }, 1) + }) + + it('can add an event on a property change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('lastName', function (val) { + this.address('Dagobah') + }) + + yoda.lastName('Grand Jedi Master') + + setTimeout(function () { + expect(yoda.address()).equal('Dagobah') + done() + }, 1) + }) + + it('can remove an event on a property change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('lastName', (val) => this.address('Dagobah')) + + yoda.off('lastName') + + yoda.lastName('Grand Jedi Master') + + setTimeout(function () { + expect(yoda.address()).equal('') + done() + }, 1) + }) + + it('can add an event on a structure change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('custom.property0', (val) => this.custom().property3('changed')) + + yoda.custom().property0('some') + + setTimeout(function () { + expect(yoda.custom().property3()).equal('changed') + done() + }, 1) + }) + + it('can remove an event on a structure change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('custom.property0', (val) => this.custom().property3('changed')) + + yoda.off('custom.property0') + + yoda.custom().property0('some') + + setTimeout(function () { + expect(yoda.custom().property3()).equal('') + done() + }, 1) + }) + + it('can add an event on a specific property of an element of a collection', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + location: { + cities: [{ street: '' }], + }, + }) + + yoda.on('location.cities[0].street', (val) => + this.custom().property0('property changed') + ) + + yoda.location().cities(0).street('a street') + + setTimeout(function () { + expect(yoda.custom().property0()).equal('property changed') + done() + }, 1) + }) + + it('can add an event on a specific property of all elements of a collection', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + location: { + cities: [{ street: '' }], + }, + }) + + yoda.on('location.cities.street', (val) => + this.custom().property0('property changed again') + ) + + yoda.location().cities(0).street('a street') + + setTimeout(function () { + expect(yoda.custom().property0()).equal('property changed again') + done() + }, 1) + }) + + it('can navigate through relationships bewteen components', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children().push(luke) + + const leia = new Person({ + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + leia.father(anakin) + + expect(leia.father().children(0).firstName()).equal('Luke') + }) + + it('can get a property', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + expect(yoda.firstName()).equal('Yoda') + }) + + it('can set a property', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + yoda.lastName('Grand Jedi Master') + + expect(yoda.lastName()).equal('Grand Jedi Master') + }) + + it('can not set an invalid value', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + yoda.lastName(42) + + expect(yoda.lastName()).equal('Master') + }) + + it('can set a date', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + const now = new Date() + yoda.birthDate(now) + + expect(yoda.birthDate().toISOString()).equal(now.toISOString()) + }) + + it('can add a link to another component', function () { + const Person = runtime.require('Person') + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + const leia = new Person({ + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + leia.father(anakin) + + expect(leia.father().firstName()).equal('Anakin') + }) + + it('can add a link to another component that inherits from the valid class', function () { + const Person = runtime.require('Person') + const Teacher = runtime.require('Teacher') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const yoda = new Teacher({ + firstName: 'Yoda', + lastName: 'Master', + }) + + luke.teacher(yoda) + + expect(luke.teacher()).to.not.be.undefined + }) + + it('can remove a link to another component', function () { + const Person = runtime.require('Person') + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + const leia = new Person({ + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + leia.father(anakin) + leia.father(null) + + expect(leia.father()).equal(undefined) + }) + + it('can add an item in a collection in the config', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + children: [luke], + }) + + expect(anakin.children(0).id()).equal(luke.id()) + }) + + it('can add an item in a collection with api', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children(0, luke) + + expect(anakin.children(0).id()).equal(luke.id()) + }) + + it('can add items in a collection with api', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children([luke, anakin]) + + expect(anakin.children().length).equal(2) + }) + + it('can remove an item of a collection with pop', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + children: [luke], + }) + + expect(anakin.children().pop().id()).equal(luke.id()) + }) + + it('can remove an item of an array property with pop', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + likes: ['saying noooooo!'], + }) + + luke.likes().pop() + + expect(luke.likes().length).equal(0) + }) + + it('can add an item of a collection with push', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children().push(luke) + + expect(anakin.children(0).id()).equal(luke.id()) + }) + + it('can add an item of an array property with push', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + luke.likes().push('saying nooooooo!') + + expect(luke.likes().length).equal(1) + }) + + it('can clear a collection with api', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children([luke, anakin]) + anakin.children([]) + + expect(anakin.children().length).equal(0) + }) + const Teacher = runtime.require('Teacher') + + it('can add an item in a collection that inherits from the valid class', function () { + const Person = runtime.require('Person') + const Teacher = runtime.require('Teacher') + + const vador = new Person({ + firstName: 'Darth', + lastName: 'Vader', + }) + + const luke = new Teacher({ + firstName: 'Yoda', + lastName: 'Master', + }) + + vador.children(0, luke) + + expect(vador.children(0)).to.not.be.undefined + }) + + it('can destroy itself', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + const id = yoda.id() + yoda.destroy() + + expect(runtime.require(id)).equal(undefined) + }) + + it('can destroy a class', function () { + const Person = runtime.require('Person') + Person.destroy() + + const result = runtime.require('Person') + expect(result).equal(undefined) + }) + + it('can create a core object', function () { + const Person = runtime.require('Person') + const shadow = new Person({ + firstName: 'Shadow', + lastName: 'Object', + _core: true, + }) + + expect(runtime.bundle().indexOf('Shadow')).equal(-1) + }) + + it('can call a parent method', function () { + const Person = runtime.require('Person') + const Teacher = runtime.require('Teacher') + + Person.on('fullName', () => { + return this.firstName() + ' ' + this.lastName() + }) + + Teacher.on('fullName', () => { + return 'Great Teacher ' + this.require('Person').fullName(this) + }) + + const eikichi = new Teacher({ + firstName: 'Eikichi', + lastName: 'Onizuka', + }) + + expect(eikichi.fullName()).equal('Great Teacher Eikichi Onizuka') + }) + + it('can send an error catched by the runtime', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + _id: 'yoda', + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + runtime.on('error', (data) => this.require('yoda').lastName('error')) + + yoda.on('testMethod', () => ANonDefinedFunction()) + yoda.testMethod() + + setTimeout(function () { + expect(yoda.lastName()).equal('error') + done() + }, 1) + }) + + it('can send an error catched by a component', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + yoda.on('error', (data) => this.lastName('error')) + + yoda.on('testMethod', () => ANonDefinedFunction()) + yoda.testMethod() + + setTimeout(function () { + expect(yoda.lastName()).equal('error') + done() + }, 1) + }) + + it('can send an error catched by the system', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + _id: 'yoda1', + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + runtime + .system() + .on('error', (data) => this.require('yoda1').lastName('error')) + + yoda.on('testMethod', () => ANonDefinedFunction()) + yoda.testMethod() + + setTimeout(function () { + expect(yoda.lastName()).equal('error') + done() + }, 1) + }) +}) diff --git a/cypress/e2e/database.cy.js b/cypress/e2e/database.cy.js new file mode 100644 index 0000000..2076cc7 --- /dev/null +++ b/cypress/e2e/database.cy.js @@ -0,0 +1,8 @@ +import runtime from '../../dist/system-runtime.js' + +describe('System Runtime db component', function () { + it('exists', function () { + const db = runtime.require('db') + expect(db).to.not.be.undefined + }) +}) diff --git a/cypress/e2e/history.cy.js b/cypress/e2e/history.cy.js new file mode 100644 index 0000000..4940101 --- /dev/null +++ b/cypress/e2e/history.cy.js @@ -0,0 +1,197 @@ +import runtime from '../../dist/system-runtime.js' + +describe('System Runtime history component', function () { + beforeEach(function () { + const history = runtime.require('history') + history.start() + }) + + afterEach(function () { + const history = runtime.require('history') + history.stop() + }) + + it('exists', function () { + const history = runtime.require('history') + + expect(history).to.not.be.undefined + }) + + it('can go back', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema({ + _name: 'PersonHistoryTest1', + _inherit: ['_Component'], + firstName: 'property', + }) + + metamodel.model({ + _name: 'PersonHistoryTest1', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + }) + + metamodel.create() + + expect(metamodel.require('PersonHistoryTest1')).to.not.be.undefined + + const Person = runtime.require('PersonHistoryTest1') + + // insert + new Person({ + firstName: 'Yoda', + }) + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(1) + + const history = runtime.require('history') + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(0) + + // update + const yoda = new Person({ + firstName: 'Yoda', + }) + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(1) + + yoda.firstName('none') + + history.from(-1) + history.back() + + expect(yoda.firstName()).equal('Yoda') + + // remove + yoda.destroy() + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(1) + }) + + it('can go forward', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema({ + _name: 'PersonHistoryTest2', + _inherit: ['_Component'], + firstName: 'property', + }) + + metamodel.model({ + _name: 'PersonHistoryTest2', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + }) + + metamodel.create() + + expect(metamodel.require('PersonHistoryTest2')).to.not.be.undefined + + const Person = runtime.require('PersonHistoryTest2') + + // remove + const yoda = new Person({ + firstName: 'Yoda', + }) + yoda.destroy() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(0) + + const history = runtime.require('history') + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(1) + + history.forward() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(0) + + // update + const yoda1 = new Person({ + firstName: 'Yoda', + }) + yoda1.firstName('none') + + history.from(-1) + history.back() + + expect(yoda1.firstName()).equal('Yoda') + + history.forward() + + expect(yoda1.firstName()).equal('none') + + // insert + new Person({ + firstName: 'Yoda', + }) + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(2) + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(1) + + history.forward() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(2) + }) + + it('can get an item of the history', function () { + const history = runtime.require('history') + const item = history.get(0) + + expect(item.action).to.not.be.undefined + }) + + it('can dump all the history', function () { + const history = runtime.require('history') + + expect(history.dump()).to.not.be.undefined + }) + + it('can load a dump of an history', function () { + const history = runtime.require('history') + const dump = history.dump() + + expect(history.load(dump)).equal(true) + }) +}) diff --git a/cypress/e2e/metamodel.cy.js b/cypress/e2e/metamodel.cy.js new file mode 100644 index 0000000..4d3ae73 --- /dev/null +++ b/cypress/e2e/metamodel.cy.js @@ -0,0 +1,594 @@ +import runtime from '../../dist/system-runtime.js' + +describe('System Runtime metamodel component', function () { + it('exists', function () { + const metamodel = runtime.require('metamodel') + + expect(metamodel).to.not.be.undefined + }) + + it('can add a schema', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema({ + _name: 'PersonTest', + _inherit: ['_Component'], + firstName: 'property', + }) + + metamodel.model({ + _name: 'PersonTest', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + }) + + metamodel.create() + + expect(metamodel.require('PersonTest')).to.not.be.undefined + }) + + it('can update a generated model (simple mode)', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema('PersonTestSimple', { + firstName: 'property', + }) + + metamodel.model('PersonTestSimple', { + firstName: 'string', + }) + + metamodel.create() + + expect(metamodel.require('PersonTestSimple')).to.not.be.undefined + }) + + it('can update a method signature (simple mode)', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema('MethodTest', { + add: 'method', + }) + + metamodel.model('MethodTest', { + add: { + p1: 'number', + p2: 'number', + '=>': 'number', + }, + }) + + metamodel.create() + + let MethodTest = runtime.require('MethodTest') + + MethodTest.on('add', (p1, p2) => { + return p1 + p2 + }) + + let test = new MethodTest() + + expect(test.add(1, 2)).equal(3) + }) + + it('can add a type', function () { + const metamodel = runtime.require('metamodel') + + metamodel.type({ + name: 'address', + type: 'object', + schema: { + planet: { type: 'string', mandatory: true }, + }, + }) + + metamodel.type({ + name: 'sex', + type: 'string', + value: ['male', 'female'], + }) + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const yoda = new Person({ + sex: 'male', + firstName: 'Yoda', + lastName: 'Master', + address: { + planet: 'Dagobah', + }, + }) + + expect(yoda.address().planet()).equal('Dagobah') + }) + + it('can add a type (simple mode)', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema('PersonTestSimple2', { + firstName: 'property', + address: 'property', + }) + + metamodel.model('PersonTestSimple2', { + firstName: 'string', + address: 'address2', + }) + + metamodel.type('address2', { + address: 'string', + city: 'city', + }) + + metamodel.type('city', ['Paris', 'Rennes']) + + metamodel.create() + + let PersonTestSimple2 = runtime.require('PersonTestSimple2') + + let person = new PersonTestSimple2({ + firstName: 'a name', + address: { + address: 'an address', + city: 'Paris', + }, + }) + + expect(person.address().city()).equal('Paris') + }) + + it('can create a collection of structure', function () { + const metamodel = runtime.require('metamodel') + + metamodel.type({ + name: 'vegetable', + type: 'object', + schema: { + kind: { type: ['string'], mandatory: true }, + }, + }) + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + firstName: 'property', + lastName: 'property', + eats: 'collection', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + eats: { + type: ['vegetable'], + readOnly: true, + mandatory: false, + default: [], + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const yoda = new Person({ + sex: 'male', + firstName: 'Yoda', + lastName: 'Master', + eats: [ + { + kind: ['all'], + }, + ], + }) + + expect(yoda.eats(0).kind(0)).equal('all') + }) + + it('can create a complex structure', function () { + const metamodel = runtime.require('metamodel') + + metamodel.type({ + name: 'foods', + type: 'object', + schema: { + vegetables: { type: 'vegetable', mandatory: true }, + }, + }) + + metamodel.type({ + name: 'vegetable', + type: 'object', + schema: { + kind: { type: ['string'], mandatory: true }, + }, + }) + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + firstName: 'property', + lastName: 'property', + likes: 'property', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + likes: { + type: 'foods', + readOnly: true, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const yoda = new Person({ + sex: 'male', + firstName: 'Yoda', + lastName: 'Master', + likes: { + vegetables: { + kind: ['all'], + }, + }, + }) + + expect(yoda.likes().vegetables().kind(0)).equal('all') + }) + + it('can create a one to one relationship', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + father: 'link', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const anakin = new Person({ + sex: 'male', + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + const luke = new Person({ + sex: 'male', + firstName: 'Luke', + lastName: 'Skywalkers', + father: anakin, + }) + + expect(luke.father().firstName()).equal('Anakin') + }) + + it('can create a one to many relationship', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + children: 'collection', + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + father: 'link', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + children: { + type: ['Person'], + readOnly: true, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const leia = new Person({ + sex: 'female', + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + const luke = new Person({ + sex: 'male', + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const padme = new Person({ + sex: 'female', + firstName: 'Padme', + lastName: 'Amidala', + children: [luke, leia], + }) + + expect(padme.children(1).firstName()).equal('Leia Amidala') + }) + + it('can generate APIs to navigate through the model', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + children: 'collection', + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + father: 'link', + son: 'property', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + children: { + type: ['Person'], + readOnly: true, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + son: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const luke = new Person({ + sex: 'male', + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + sex: 'male', + firstName: 'Anakin', + lastName: 'Skywalker', + son: luke, + }) + + const leia = new Person({ + sex: 'female', + firstName: 'Leia Amidala', + lastName: 'Skywalker', + father: anakin, + }) + + expect(leia.father().son().firstName()).equal('Luke') + }) + + it('can generate empty method', function () { + const metamodel = runtime.require('metamodel') + + // create the schema + metamodel.schema('PersonSimple', { + firstName: 'property', + lastName: 'property', + age: 'property', + father: 'link', + mother: 'link', + children: 'collection', + fullName: 'method', + }) + + // override the generated model + metamodel.model('PersonSimple', { + firstName: 'string', + lastName: 'string', + age: 'number', + father: 'Person', + mother: 'Person', + children: ['Person'], + fullName: { + '=>': 'string', + }, + }) + + // create the model and related class + metamodel.create() + + const PersonSimple = runtime.require('PersonSimple') + const person = new PersonSimple({ + firstName: 'a first name', + mother: '', + children: [], + }) + + expect(person.fullName()).equal(undefined) + }) +}) diff --git a/cypress/e2e/mson.cy.js b/cypress/e2e/mson.cy.js new file mode 100644 index 0000000..7c38cbe --- /dev/null +++ b/cypress/e2e/mson.cy.js @@ -0,0 +1,115 @@ +import runtime from '../../dist/system-runtime.js' + +describe('a MSON schema', function () { + it('can make inheritance at schema level', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person_test', + _inherit: ['_Component'], + firstName: 'property', + lastName: 'property', + getFullName: 'method', + }) + + metamodel.schema({ + _name: 'Teacher_test', + _inherit: ['Person_test'], + }) + + metamodel.create() + + const Person = runtime.require('Person_test') + + Person.off('getFullName') + + Person.on('getFullName', () => this.firstName() + ' ' + this.lastName()) + + const Teacher = runtime.require('Teacher_test') + + const eikichi = new Teacher({ + firstName: 'Eikichi', + lastName: 'Onizuka', + }) + + expect(eikichi.getFullName()).equal('Eikichi Onizuka') + }) + + it('implements C3 superclass linearization algorithm', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'TestResult', + getParent: 'method', + }) + + metamodel.model({ + _name: 'TestResult', + getParent: { + params: [], + result: 'array', + }, + }) + + metamodel.schema({ + _name: 'O', + _inherit: [], + }) + + metamodel.schema({ + _name: 'A', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'B', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'C', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'D', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'E', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'K1', + _inherit: ['A', 'B', 'C'], + }) + + metamodel.schema({ + _name: 'K2', + _inherit: ['D', 'B', 'E'], + }) + + metamodel.schema({ + _name: 'K3', + _inherit: ['D', 'A'], + }) + + metamodel.schema({ + _name: 'Z', + _inherit: ['K1', 'K2', 'K3'], + }) + + metamodel.create() + + const TestResult = runtime.require('TestResult') + TestResult.on('getParent', () => $metamodel.getParents('Z'), true) + + const test = new TestResult() + + expect(test.getParent().join('_')).equal( + ['K1', 'K2', 'K3', 'D', 'A', 'B', 'C', 'E', 'O'].join('_') + ) + }) +}) diff --git a/cypress/e2e/runtime.cy.js b/cypress/e2e/runtime.cy.js new file mode 100644 index 0000000..cdcf5a1 --- /dev/null +++ b/cypress/e2e/runtime.cy.js @@ -0,0 +1,101 @@ +import runtime from '../../dist/system-runtime.js' + +describe('System Runtime runtime component', function () { + it('exists', function () { + expect(runtime).to.not.be.undefined + }) + + it('can get its version', function () { + const version = runtime.version() + + expect(typeof version).equal('string') + }) + + it('can create a system', function () { + const id = runtime.system('a system') + + expect(id).to.not.be.undefined + }) + + it('can bundle a system', function () { + const bundle = runtime.bundle() + + expect(bundle).to.not.be.undefined + }) + + it('can get the status of all installed bundles', function () { + const status = runtime.status() + + expect(status).to.not.be.undefined + }) + + it('can install a bundle', function () { + const systemId = runtime.install({ + name: 'Test', + master: true, + version: '0.0.1', + description: '', + schemas: { + k141cc1821c1b775: { + _id: 'k141cc1821c1b775', + _name: 'TestSchema', + _inherit: ['_Component'], + }, + }, + models: { + b19c171575f1824b: { + _id: 'b19c171575f1824b', + _name: 'TestSchema', + _description: '', + }, + }, + behaviors: { + n1e72b1ed051cf36: { + _id: 'n1e72b1ed051cf36', + component: 'k16d101760d1ec2a', + state: 'start', + action: 'function start() { \n \n}', + useCoreAPI: false, + core: false, + }, + }, + types: { + TestType: { + _id: 'o1cf651e05613735', + name: 'TestType', + description: '', + type: 'object', + schema: { + property1: { + type: 'any', + mandatory: false, + default: '', + }, + property2: { + type: 'any', + mandatory: false, + default: '', + }, + }, + }, + }, + components: { + TestSchema: { + z1f91a1beb01f48f: { + _id: 'z1f91a1beb01f48f', + }, + }, + }, + _id: 'k16d101760d1ec2a', + }) + + expect(systemId).equal('k16d101760d1ec2a') + }) + + it('can uninstall a bundle', function () { + runtime.uninstall('k16d101760d1ec2a') + const state = runtime.require('k16d101760d1ec2a').state() + + expect(state).equal('uninstalled') + }) +}) diff --git a/cypress/e2e/system.cy.js b/cypress/e2e/system.cy.js new file mode 100644 index 0000000..945b18f --- /dev/null +++ b/cypress/e2e/system.cy.js @@ -0,0 +1,48 @@ +import runtime from '../../dist/system-runtime.js' + +describe('a system', function () { + let system = null + + // init + beforeEach(function () { + system = runtime.system('test5') + }) + + it('has a name', function () { + expect(system.name()).equal('test5') + }) + + it('has a description', function () { + expect(typeof system.description()).equal('string') + }) + + it('has a version', function () { + expect(system.version()).to.not.be.undefined + }) + + it('has schemas', function () { + expect(system.schemas()).to.not.be.undefined + }) + + it('has models', function () { + expect(system.models()).to.not.be.undefined + }) + + it('has behaviors', function () { + expect(system.behaviors()).to.not.be.undefined + }) + + it('has types', function () { + expect(system.types()).to.not.be.undefined + }) + + it('has components', function () { + expect(system.components()).to.not.be.undefined + }) + + it('can get its location', function () { + const location = system.location() + + expect(location).to.not.be.undefined + }) +}) diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js new file mode 100644 index 0000000..e69de29 diff --git a/dist/system-runtime.js b/dist/system-runtime.js new file mode 100644 index 0000000..6c8d849 --- /dev/null +++ b/dist/system-runtime.js @@ -0,0 +1,21 @@ +/*! + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=T(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var q={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let F={};var V={set:function(e,t,n){F[e]={state:t,value:n}},get:function(e){return F[e]},clear:function(){F={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function Q(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=q.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=q.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?q.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],q.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"5.1.0\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"5.1.0\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\\n if (url.indexOf('.json') !== -1) {\\n if (typeof global.process.env.PWD === 'undefined') {\\n system = require(global.process.cwd() + '/' + url);\\n } else {\\n system = require(global.process.env.PWD + '/' + url);\\n }\\n } else {\\n system = require(url);\\n }\\n systemId = $db.importSystem(system);\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"5.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,CAAC,WAAY,aAAc,OAAQ,SAAU,SAiHlEC,cA/GoB,CACpB,UACA,SACA,SACA,SACA,WACA,QACA,OACA,OAwGAC,kBArGwB,CACxBC,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,CACLF,KAAM,SACNC,WAAW,GAEbE,SAAU,CACRH,KAAM,CAAC,UACPC,WAAW,EACXG,QAAS,CAAC,eAEZC,OAAQ,CACNL,KAAM,UACNC,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IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file diff --git a/example/index.html b/example/index.html new file mode 100644 index 0000000..b31ee68 --- /dev/null +++ b/example/index.html @@ -0,0 +1,71 @@ + + + + + + + Example + + + + + + + diff --git a/example/module.js b/example/module.js new file mode 100644 index 0000000..82a7b05 --- /dev/null +++ b/example/module.js @@ -0,0 +1,3 @@ +const newValue = 'Dagobah' + +export default newValue diff --git a/example/test.js b/example/test.js new file mode 100644 index 0000000..25be5da --- /dev/null +++ b/example/test.js @@ -0,0 +1,184 @@ +import runtime from '../src/runtime.js' + +runtime.require('logger').level('debug') + +runtime.system('component-spec') +const metamodel = runtime.require('metamodel') + +metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + birthDate: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + location: 'property', + likes: 'property', + custom: 'property', + fullName: 'method', + testMethod: 'method', + children: 'collection', + teacher: 'link', + father: 'link', + moving: 'event', +}) + +metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + birthDate: { + type: 'date', + readOnly: false, + mandatory: false, + default: '1970-01-01T00:00:00.000Z', + }, + children: { + type: ['Person'], + readOnly: false, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + likes: { + type: 'array', + readOnly: false, + mandatory: false, + default: [], + }, + custom: { + type: 'mycustomType', + readOnly: false, + mandatory: false, + default: {}, + }, + fullName: { + result: 'string', + }, + testMethod: {}, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + teacher: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + address: { + type: 'string', + readOnly: false, + mandatory: false, + default: '', + }, + location: { + type: 'location', + readOnly: false, + mandatory: false, + default: {}, + }, + moving: {}, +}) + +metamodel.schema({ + _name: 'Teacher', + _inherit: ['Person'], +}) + +metamodel.type({ + name: 'mycustomType', + description: '', + type: 'object', + schema: { + property0: { + type: 'string', + mandatory: false, + default: '', + }, + property1: { + type: 'array', + mandatory: false, + default: [], + }, + property2: { + type: 'object', + mandatory: false, + default: {}, + }, + property3: { + type: 'any', + mandatory: false, + default: '', + }, + property4: { + type: 'boolean', + mandatory: false, + default: false, + }, + property5: { + type: 'date', + mandatory: false, + default: '', + }, + property6: { + type: 'json', + mandatory: false, + default: {}, + }, + }, +}) + +metamodel.type({ + name: 'street', + description: '', + type: 'object', + schema: { + street: { + type: 'string', + mandatory: false, + default: '', + }, + }, +}) + +metamodel.type({ + name: 'location', + description: '', + type: 'object', + schema: { + cities: { + type: ['street'], + mandatory: false, + default: [], + }, + }, +}) + +metamodel.create() + +const Person = runtime.require('Person') +const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', +}) + +yoda.on('lastName', async (val) => { + const newValue = await import('../example/module.js') + console.log(newValue.default) + this.address(newValue.default) +}) + +yoda.lastName('Grand Jedi Master') diff --git a/extensions/README.md b/extensions/README.md index b17755b..b8af8c2 100755 --- a/extensions/README.md +++ b/extensions/README.md @@ -10,14 +10,14 @@ Just add a link tag in your HTML to install and start your extension: ```html - + ``` #### Install an extension server-side -Just call *install* API to install and start your extension: +Just call _install_ API to install and start your extension: ```js -// install your extensions -runtime.install('storage.json'); -``` \ No newline at end of file +// install your extensions +runtime.install('storage.json') +``` diff --git a/extensions/mode-admin-server.json b/extensions/mode-admin-server.json index 7f1996f..e0c5462 100755 --- a/extensions/mode-admin-server.json +++ b/extensions/mode-admin-server.json @@ -1 +1,455 @@ -{"name":"mode-admin-server","master":false,"version":"1.0.0","description":"","schemas":{"1723516a30132ac":{"_name":"_Database","_inherit":["_Component"],"_core":true,"insert":"event","update":"event","remove":"event","_id":"1723516a30132ac"},"10374180581a41f":{"_id":"10374180581a41f","_name":"_Admin","_inherit":["_Component"],"_core":true},"104ad1f48518376":{"_id":"104ad1f48518376","_name":"_Channel","_core":true,"$editorUpdateSystem":"event","$editorUpdateSchema":"event","$editorUpdateSchemaId":"event","$editorUpdateSchemaName":"event","$editorUpdateModel":"event","$editorUpdateModelId":"event","$editorUpdateType":"event","$editorDeleteType":"event","$editorUpdateBehavior":"event","$editorDeleteBehavior":"event","$editorUpdateComponent":"event","$editorUpdateComponentId":"event","$editorDeleteComponent":"event","$appLogDebug":"event","$appLogInfo":"event","$appLogWarn":"event","$appLogError":"event","$appLoadSystem":"event","$designerSync":"event","$designerCreateBehavior":"event","$designerCreateComponent":"event","$designerCreateType":"event","$designerCreateSchema":"event","$designerCreateModel":"event","$designerDeleteSchema":"event","$designerDeleteModel":"event","$designerDeleteType":"event","$designerDeleteBehavior":"event","$designerDeleteComponent":"event","$designerUpdateComponent":"event","$designerUpdateModel":"event","$designerUpdateBehavior":"event","$runtimeCreateComponent":"event","$runtimeDeleteComponent":"event","$runtimeUpdateComponent":"event","send":"event"}},"models":{"18a51169d7112d4":{"_name":"_Database","_core":true,"insert":{"params":[{"name":"event","type":"dbInsertEvent"}]},"update":{"params":[{"name":"event","type":"dbUpdateEvent"}]},"remove":{"params":[{"name":"event","type":"dbRemoveEvent"}]},"_id":"18a51169d7112d4"},"138a81fa1f16435":{"_id":"138a81fa1f16435","_name":"_Admin","_inherit":["_Component"],"_core":true},"135c71078810af2":{"_id":"135c71078810af2","_name":"_Channel","_inherit":["_Component"],"_core":true,"$editorUpdateSchemaName":{"params":[{"name":"name","type":"string"},{"name":"id","type":"string"}]},"$designerSync":{"params":[{"name":"req","type":"object"}]},"$appLoadSystem":{"params":[{"name":"system","type":"object"}]},"$designerCreateBehavior":{"params":[{"name":"behavior","type":"object"}]},"$editorUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$designerUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$editorDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponentId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"},{"name":"collection","type":"string"}]},"$designerUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerCreateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorUpdateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchemaId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteSchema":{"params":[{"name":"id","type":"string"}]},"$designerCreateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$designerUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModelId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteModel":{"params":[{"name":"id","type":"string"}]},"$editorUpdateSystem":{"params":[{"name":"id","type":"string"},{"name":"system","type":"object"}]},"$appLogDebug":{"params":[{"name":"message","type":"string"}]},"$appLogInfo":{"params":[{"name":"message","type":"string"}]},"$appLogWarn":{"params":[{"name":"message","type":"string"}]},"$appLogError":{"params":[{"name":"message","type":"string"}]},"$runtimeCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$runtimeDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$runtimeUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"field","type":"string"},{"name":"value","type":"any"}]},"send":{"params":[{"name":"message","type":"message"}]}}},"behaviors":{"h1b3891699319be4":{"_id":"h1b3891699319be4","component":"channel","state":"$designerCreateSchema","action":"function $designerCreateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w161ae196d51f585":{"_id":"w161ae196d51f585","component":"channel","state":"$editorUpdateSchema","action":"function $editorUpdateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x12449136a811be2":{"_id":"x12449136a811be2","component":"channel","state":"$designerDeleteSchema","action":"function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n var search = $db._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db._Schema.remove({ '_id': id });\n \n search = $db._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"h103b01d9591bbb4":{"_id":"h103b01d9591bbb4","component":"channel","state":"$designerCreateModel","action":"function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"r12c4e1d6cf1cf0e":{"_id":"r12c4e1d6cf1cf0e","component":"channel","state":"$editorUpdateModel","action":"function $editorUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x1eb4c1d03b1ee34":{"_id":"x1eb4c1d03b1ee34","component":"channel","state":"$designerUpdateModel","action":"function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w1c68e1c7aa19326":{"_id":"w1c68e1c7aa19326","component":"channel","state":"$designerDeleteModel","action":"function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n var search = $db._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"x1f6bc11b3816de0":{"_id":"x1f6bc11b3816de0","component":"channel","state":"$designerCreateType","action":"function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"m1ff4f11d19164c0":{"_id":"m1ff4f11d19164c0","component":"channel","state":"$editorUpdateType","action":"function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"u1e8bd17bdc15d6a":{"_id":"u1e8bd17bdc15d6a","component":"channel","state":"$editorDeleteType","action":"function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"k18a311f76f1ff2a":{"_id":"k18a311f76f1ff2a","component":"channel","state":"$designerDeleteType","action":"function $designerDeleteType() { \n this.require('logger').level('warn');\n $db._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"i1fe2e1f8fe1f3b7":{"_id":"i1fe2e1f8fe1f3b7","component":"channel","state":"$designerCreateComponent","action":"function $designerCreateComponent(collection, component) { \n $db[collection].insert(component);\t\n}","useCoreAPI":true,"core":true},"e1cc381f58818dd4":{"_id":"e1cc381f58818dd4","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"r18f80173fe19997":{"_id":"r18f80173fe19997","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"o1ed5a1768c181b2":{"_id":"o1ed5a1768c181b2","component":"channel","state":"$editorDeleteComponent","action":"function $editorDeleteComponent(id, collection) { \n $db[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"t18fe213b0718b38":{"_id":"t18fe213b0718b38","component":"channel","state":"$designerDeleteComponent","action":"function $designerDeleteComponent(id, collection) { \n $db[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"p1524e1d2c414a17":{"_id":"p1524e1d2c414a17","component":"channel","state":"$designerCreateBehavior","action":"function $designerCreateBehavior(behavior) { \n $db._Behavior.insert(behavior);\t\n}","useCoreAPI":true,"core":true},"m154451abb8103f1":{"_id":"m154451abb8103f1","component":"channel","state":"$editorUpdateBehavior","action":"function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require(behavior.component).start();\n }\n }\n}","useCoreAPI":true,"core":true},"q131b819d531053f":{"_id":"q131b819d531053f","component":"channel","state":"$editorDeleteBehavior","action":"function $editorDeleteBehavior(id) { \n $db._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h1214316cb61ea28":{"_id":"h1214316cb61ea28","component":"channel","state":"$designerDeleteBehavior","action":"function $designerDeleteBehavior(id) { \n $db._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h109eb1b4ed148fd":{"_id":"h109eb1b4ed148fd","component":"channel","state":"$designerSync","action":"function $designerSync(req) { \n req.end(this.require('runtime').bundle());\t\n}","useCoreAPI":true,"core":true},"w1a9961205712671":{"_id":"w1a9961205712671","component":"db","state":"insert","action":"function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}","useCoreAPI":false,"core":true},"j122701697c19935":{"_id":"j122701697c19935","component":"db","state":"remove","action":"function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}","useCoreAPI":false,"core":true},"t118f61f6d0127e4":{"_id":"t118f61f6d0127e4","component":"db","state":"update","action":"function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}","useCoreAPI":false,"core":true},"e10ba11978d122c5":{"_id":"e10ba11978d122c5","component":"admin","state":"init","action":"function init(conf) {\n var require = require,\n http = require('http'),\n qs = require('querystring'),\n runtime = require('system-runtime');\n\n // Create server\n http.createServer(function (req, res) {\n var message = null;\n\n // POST\n if (req.method == 'POST') {\n var body = '';\n req.on('data', function (data) {\n body = body + data;\n if (body.length > 1e6) {\n req.connection.destroy();\n }\n });\n req.on('end', function () {\n var post = qs.parse(body),\n message = {};\n\n function _postToMessage(url, post) {\n var message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n }\n }\n\n message.event = event;\n message.data = JSON.parse(decodeURIComponent(Object.keys(post)[0]));\n\n return message;\n }\n\n message = _postToMessage(req.url, post);\n runtime.message(message);\n });\n }\n\n // GET\n if (req.method == 'GET') {\n function _getToMessage(url, res) {\n var message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n if (url.indexOf('favicon.ico') !== -1) {\n message = null;\n } else {\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n } else {\n data.push(params[i]);\n }\n }\n data.push(res);\n\n message.event = event;\n message.data = data;\n\n if (event === '') {\n message = null;\n }\n }\n return message;\n }\n\n res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });\n message = _getToMessage(req.url, res);\n\n if (message) {\n runtime.message(message);\n } else {\n res.end('');\n }\n }\n }).listen(8888, '127.0.0.1');\n\n console.log('System Runtime Admin is started on http://127.0.0.1:8888');\n}","useCoreAPI":true,"core":true}},"types":{},"components":{"_Admin":{"admin":{"_id":"admin","_core":true}},"_Channel":{"channel":{"_id":"channel"}},"_Database":{"db":{"_id":"db"}}},"_id":"q1e1a01bbb514f49"} \ No newline at end of file +{ + "name": "mode-admin-server", + "master": false, + "version": "1.0.0", + "description": "", + "schemas": { + "1723516a30132ac": { + "_name": "_Database", + "_inherit": ["_Component"], + "_core": true, + "insert": "event", + "update": "event", + "remove": "event", + "_id": "1723516a30132ac" + }, + "10374180581a41f": { + "_id": "10374180581a41f", + "_name": "_Admin", + "_inherit": ["_Component"], + "_core": true + }, + "104ad1f48518376": { + "_id": "104ad1f48518376", + "_name": "_Channel", + "_core": true, + "$editorUpdateSystem": "event", + "$editorUpdateSchema": "event", + "$editorUpdateSchemaId": "event", + "$editorUpdateSchemaName": "event", + "$editorUpdateModel": "event", + "$editorUpdateModelId": "event", + "$editorUpdateType": "event", + "$editorDeleteType": "event", + "$editorUpdateBehavior": "event", + "$editorDeleteBehavior": "event", + "$editorUpdateComponent": "event", + "$editorUpdateComponentId": "event", + "$editorDeleteComponent": "event", + "$appLogDebug": "event", + "$appLogInfo": "event", + "$appLogWarn": "event", + "$appLogError": "event", + "$appLoadSystem": "event", + "$designerSync": "event", + "$designerCreateBehavior": "event", + "$designerCreateComponent": "event", + "$designerCreateType": "event", + "$designerCreateSchema": "event", + "$designerCreateModel": "event", + "$designerDeleteSchema": "event", + "$designerDeleteModel": "event", + "$designerDeleteType": "event", + "$designerDeleteBehavior": "event", + "$designerDeleteComponent": "event", + "$designerUpdateComponent": "event", + "$designerUpdateModel": "event", + "$designerUpdateBehavior": "event", + "$runtimeCreateComponent": "event", + "$runtimeDeleteComponent": "event", + "$runtimeUpdateComponent": "event", + "send": "event" + } + }, + "models": { + "18a51169d7112d4": { + "_name": "_Database", + "_core": true, + "insert": { "params": [{ "name": "event", "type": "dbInsertEvent" }] }, + "update": { "params": [{ "name": "event", "type": "dbUpdateEvent" }] }, + "remove": { "params": [{ "name": "event", "type": "dbRemoveEvent" }] }, + "_id": "18a51169d7112d4" + }, + "138a81fa1f16435": { + "_id": "138a81fa1f16435", + "_name": "_Admin", + "_inherit": ["_Component"], + "_core": true + }, + "135c71078810af2": { + "_id": "135c71078810af2", + "_name": "_Channel", + "_inherit": ["_Component"], + "_core": true, + "$editorUpdateSchemaName": { + "params": [ + { "name": "name", "type": "string" }, + { "name": "id", "type": "string" } + ] + }, + "$designerSync": { "params": [{ "name": "req", "type": "object" }] }, + "$appLoadSystem": { "params": [{ "name": "system", "type": "object" }] }, + "$designerCreateBehavior": { + "params": [{ "name": "behavior", "type": "object" }] + }, + "$editorUpdateBehavior": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "behavior", "type": "object" } + ] + }, + "$designerUpdateBehavior": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "behavior", "type": "object" } + ] + }, + "$editorDeleteBehavior": { + "params": [{ "name": "id", "type": "string" }] + }, + "$designerDeleteBehavior": { + "params": [{ "name": "id", "type": "string" }] + }, + "$designerCreateComponent": { + "params": [ + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$editorUpdateComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$editorUpdateComponentId": { + "params": [ + { "name": "oldId", "type": "string" }, + { "name": "newId", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$designerUpdateComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$editorDeleteComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$designerDeleteComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$designerCreateType": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "type", "type": "object" } + ] + }, + "$editorUpdateType": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "type", "type": "object" } + ] + }, + "$editorDeleteType": { "params": [{ "name": "id", "type": "string" }] }, + "$designerCreateSchema": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "schema", "type": "object" } + ] + }, + "$editorUpdateSchema": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "schema", "type": "object" } + ] + }, + "$editorUpdateSchemaId": { + "params": [ + { "name": "oldId", "type": "string" }, + { "name": "newId", "type": "string" } + ] + }, + "$designerDeleteSchema": { + "params": [{ "name": "id", "type": "string" }] + }, + "$designerCreateModel": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "model", "type": "object" } + ] + }, + "$editorUpdateModel": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "model", "type": "object" } + ] + }, + "$designerUpdateModel": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "model", "type": "object" } + ] + }, + "$editorUpdateModelId": { + "params": [ + { "name": "oldId", "type": "string" }, + { "name": "newId", "type": "string" } + ] + }, + "$designerDeleteModel": { + "params": [{ "name": "id", "type": "string" }] + }, + "$editorUpdateSystem": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "system", "type": "object" } + ] + }, + "$appLogDebug": { "params": [{ "name": "message", "type": "string" }] }, + "$appLogInfo": { "params": [{ "name": "message", "type": "string" }] }, + "$appLogWarn": { "params": [{ "name": "message", "type": "string" }] }, + "$appLogError": { "params": [{ "name": "message", "type": "string" }] }, + "$runtimeCreateComponent": { + "params": [ + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$runtimeDeleteComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$runtimeUpdateComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" }, + { "name": "field", "type": "string" }, + { "name": "value", "type": "any" } + ] + }, + "send": { "params": [{ "name": "message", "type": "message" }] } + } + }, + "behaviors": { + "h1b3891699319be4": { + "_id": "h1b3891699319be4", + "component": "channel", + "state": "$designerCreateSchema", + "action": "function $designerCreateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "w161ae196d51f585": { + "_id": "w161ae196d51f585", + "component": "channel", + "state": "$editorUpdateSchema", + "action": "function $editorUpdateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "x12449136a811be2": { + "_id": "x12449136a811be2", + "component": "channel", + "state": "$designerDeleteSchema", + "action": "function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": true, + "core": true + }, + "h103b01d9591bbb4": { + "_id": "h103b01d9591bbb4", + "component": "channel", + "state": "$designerCreateModel", + "action": "function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "r12c4e1d6cf1cf0e": { + "_id": "r12c4e1d6cf1cf0e", + "component": "channel", + "state": "$editorUpdateModel", + "action": "function $editorUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "x1eb4c1d03b1ee34": { + "_id": "x1eb4c1d03b1ee34", + "component": "channel", + "state": "$designerUpdateModel", + "action": "function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "w1c68e1c7aa19326": { + "_id": "w1c68e1c7aa19326", + "component": "channel", + "state": "$designerDeleteModel", + "action": "function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": true, + "core": true + }, + "x1f6bc11b3816de0": { + "_id": "x1f6bc11b3816de0", + "component": "channel", + "state": "$designerCreateType", + "action": "function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "m1ff4f11d19164c0": { + "_id": "m1ff4f11d19164c0", + "component": "channel", + "state": "$editorUpdateType", + "action": "function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "u1e8bd17bdc15d6a": { + "_id": "u1e8bd17bdc15d6a", + "component": "channel", + "state": "$editorDeleteType", + "action": "function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": true, + "core": true + }, + "k18a311f76f1ff2a": { + "_id": "k18a311f76f1ff2a", + "component": "channel", + "state": "$designerDeleteType", + "action": "function $designerDeleteType() { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": true, + "core": true + }, + "i1fe2e1f8fe1f3b7": { + "_id": "i1fe2e1f8fe1f3b7", + "component": "channel", + "state": "$designerCreateComponent", + "action": "function $designerCreateComponent(collection, component) { \n $db.collections[collection].insert(component);\t\n}", + "useCoreAPI": true, + "core": true + }, + "e1cc381f58818dd4": { + "_id": "e1cc381f58818dd4", + "component": "channel", + "state": "$editorUpdateComponent", + "action": "function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}", + "useCoreAPI": true, + "core": true + }, + "r18f80173fe19997": { + "_id": "r18f80173fe19997", + "component": "channel", + "state": "$editorUpdateComponent", + "action": "function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}", + "useCoreAPI": true, + "core": true + }, + "o1ed5a1768c181b2": { + "_id": "o1ed5a1768c181b2", + "component": "channel", + "state": "$editorDeleteComponent", + "action": "function $editorDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}", + "useCoreAPI": true, + "core": true + }, + "t18fe213b0718b38": { + "_id": "t18fe213b0718b38", + "component": "channel", + "state": "$designerDeleteComponent", + "action": "function $designerDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}", + "useCoreAPI": true, + "core": true + }, + "p1524e1d2c414a17": { + "_id": "p1524e1d2c414a17", + "component": "channel", + "state": "$designerCreateBehavior", + "action": "function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n}", + "useCoreAPI": true, + "core": true + }, + "m154451abb8103f1": { + "_id": "m154451abb8103f1", + "component": "channel", + "state": "$editorUpdateBehavior", + "action": "function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require(behavior.component).start();\n }\n }\n}", + "useCoreAPI": true, + "core": true + }, + "q131b819d531053f": { + "_id": "q131b819d531053f", + "component": "channel", + "state": "$editorDeleteBehavior", + "action": "function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}", + "useCoreAPI": true, + "core": true + }, + "h1214316cb61ea28": { + "_id": "h1214316cb61ea28", + "component": "channel", + "state": "$designerDeleteBehavior", + "action": "function $designerDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}", + "useCoreAPI": true, + "core": true + }, + "h109eb1b4ed148fd": { + "_id": "h109eb1b4ed148fd", + "component": "channel", + "state": "$designerSync", + "action": "function $designerSync(req) { \n req.end(this.require('runtime').bundle());\t\n}", + "useCoreAPI": true, + "core": true + }, + "w1a9961205712671": { + "_id": "w1a9961205712671", + "component": "db", + "state": "insert", + "action": "function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "j122701697c19935": { + "_id": "j122701697c19935", + "component": "db", + "state": "remove", + "action": "function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "t118f61f6d0127e4": { + "_id": "t118f61f6d0127e4", + "component": "db", + "state": "update", + "action": "function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "e10ba11978d122c5": { + "_id": "e10ba11978d122c5", + "component": "admin", + "state": "init", + "action": "function init(conf) {\n let require = require,\n http = require('http'),\n qs = require('querystring'),\n runtime = require('system-runtime');\n\n // Create server\n http.createServer(function (req, res) {\n let message = null;\n\n // POST\n if (req.method == 'POST') {\n let body = '';\n req.on('data', function (data) {\n body = body + data;\n if (body.length > 1e6) {\n req.connection.destroy();\n }\n });\n req.on('end', function () {\n let post = qs.parse(body),\n message = {};\n\n function _postToMessage(url, post) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n }\n }\n\n message.event = event;\n message.data = JSON.parse(decodeURIComponent(Object.keys(post)[0]));\n\n return message;\n }\n\n message = _postToMessage(req.url, post);\n runtime.message(message);\n });\n }\n\n // GET\n if (req.method == 'GET') {\n function _getToMessage(url, res) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n if (url.indexOf('favicon.ico') !== -1) {\n message = null;\n } else {\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n } else {\n data.push(params[i]);\n }\n }\n data.push(res);\n\n message.event = event;\n message.data = data;\n\n if (event === '') {\n message = null;\n }\n }\n return message;\n }\n\n res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });\n message = _getToMessage(req.url, res);\n\n if (message) {\n runtime.message(message);\n } else {\n res.end('');\n }\n }\n }).listen(8888, '127.0.0.1');\n\n console.log('System Runtime Admin is started on http://127.0.0.1:8888');\n}", + "useCoreAPI": true, + "core": true + } + }, + "types": {}, + "components": { + "_Admin": { "admin": { "_id": "admin", "_core": true } }, + "_Channel": { "channel": { "_id": "channel" } }, + "_Database": { "db": { "_id": "db" } } + }, + "_id": "q1e1a01bbb514f49" +} diff --git a/extensions/mode-admin.json b/extensions/mode-admin.json index 9d346e8..5c265d2 100755 --- a/extensions/mode-admin.json +++ b/extensions/mode-admin.json @@ -1 +1,550 @@ -{"name":"mode-admin","master":false,"version":"1.0.0","description":"Enable connection to System Designer","schemas":{"1723516a30132ac":{"_name":"_Database","_inherit":["_Component"],"_core":true,"insert":"event","update":"event","remove":"event","_id":"1723516a30132ac"},"10374180581a41f":{"_id":"10374180581a41f","_name":"_Admin","_inherit":["_Component"],"_core":true,"designerWindow":"property"},"104ad1f48518376":{"_id":"104ad1f48518376","_name":"_Channel","_core":true,"$editorUpdateSystem":"event","$editorUpdateSchema":"event","$editorUpdateSchemaId":"event","$editorUpdateSchemaName":"event","$editorUpdateModel":"event","$editorUpdateModelId":"event","$editorUpdateType":"event","$editorDeleteType":"event","$editorUpdateBehavior":"event","$editorDeleteBehavior":"event","$editorUpdateComponent":"event","$editorUpdateComponentId":"event","$editorDeleteComponent":"event","$appLogDebug":"event","$appLogInfo":"event","$appLogWarn":"event","$appLogError":"event","$appLoadSystem":"event","$designerSync":"event","$designerCreateBehavior":"event","$designerCreateComponent":"event","$designerCreateType":"event","$designerCreateSchema":"event","$designerCreateModel":"event","$designerDeleteSchema":"event","$designerDeleteModel":"event","$designerDeleteType":"event","$designerDeleteBehavior":"event","$designerDeleteComponent":"event","$designerUpdateComponent":"event","$designerUpdateModel":"event","$designerUpdateBehavior":"event","$designerSetSystem":"event","$runtimeCreateComponent":"event","$runtimeDeleteComponent":"event","$runtimeUpdateComponent":"event","send":"event"},"1268f1dddd1fea7":{"_name":"_Logger","_core":true,"level":"property","debug":"method","info":"method","warn":"method","error":"method","_id":"1268f1dddd1fea7"}},"models":{"18a51169d7112d4":{"_name":"_Database","_core":true,"insert":{"params":[{"name":"event","type":"dbInsertEvent"}]},"update":{"params":[{"name":"event","type":"dbUpdateEvent"}]},"remove":{"params":[{"name":"event","type":"dbRemoveEvent"}]},"_id":"18a51169d7112d4"},"138a81fa1f16435":{"_id":"138a81fa1f16435","_name":"_Admin","_inherit":["_Component"],"_core":true,"designerWindow":{"type":"object","readOnly":false,"mandatory":false,"default":null}},"135c71078810af2":{"_id":"135c71078810af2","_name":"_Channel","_inherit":["_Component"],"_core":true,"$editorUpdateSchemaName":{"params":[{"name":"name","type":"string"},{"name":"id","type":"string"}]},"$designerSync":{},"$appLoadSystem":{"params":[{"name":"system","type":"object"}]},"$designerCreateBehavior":{"params":[{"name":"behavior","type":"object"}]},"$editorUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$designerUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$editorDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponentId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"},{"name":"collection","type":"string"}]},"$designerUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorUpdateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchemaId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteSchema":{"params":[{"name":"id","type":"string"}]},"$designerCreateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$designerUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModelId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteModel":{"params":[{"name":"id","type":"string"}]},"$editorUpdateSystem":{"params":[{"name":"id","type":"string"},{"name":"system","type":"object"}]},"$appLogDebug":{"params":[{"name":"message","type":"string"}]},"$appLogInfo":{"params":[{"name":"message","type":"string"}]},"$appLogWarn":{"params":[{"name":"message","type":"string"}]},"$appLogError":{"params":[{"name":"message","type":"string"}]},"$runtimeCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$runtimeDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$runtimeUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"field","type":"string"},{"name":"value","type":"any"}]},"send":{"params":[{"name":"message","type":"message"}]},"$designerSetSystem":{"params":[{"name":"system","type":"object","mandatory":false,"default":{}}]}},"16b9d1ac2216ffe":{"_id":"16b9d1ac2216ffe","_name":"_Logger","_core":true,"level":{"type":"log","readOnly":false,"mandatory":false,"default":"warn"},"debug":{"params":[{"name":"message","type":"any"}]},"info":{"params":[{"name":"message","type":"any"}]},"warn":{"params":[{"name":"message","type":"any"}]},"error":{"params":[{"name":"message","type":"any"}]}}},"behaviors":{"g198c91f8601d02f":{"_id":"g198c91f8601d02f","component":"channel","state":"send","action":"function send(message) { \n if (this.require('admin').designerWindow()) {\n this.require('admin').designerWindow().postMessage(JSON.stringify(message), '*');\n }\n}","useCoreAPI":false,"core":true},"h1b3891699319be4":{"_id":"h1b3891699319be4","component":"channel","state":"$designerCreateSchema","action":"function $designerCreateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been created');\n }\n}","useCoreAPI":false,"core":true},"w161ae196d51f585":{"_id":"w161ae196d51f585","component":"channel","state":"$editorUpdateSchema","action":"function $editorUpdateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n \n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been updated');\n }\n}","useCoreAPI":false,"core":true},"x12449136a811be2":{"_id":"x12449136a811be2","component":"channel","state":"$designerDeleteSchema","action":"function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n var search = $db._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db._Schema.remove({ '_id': id });\n \n search = $db._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n \n this.require('logger').debug(modelName + ' class has been deleted');\n}","useCoreAPI":true,"core":true},"h103b01d9591bbb4":{"_id":"h103b01d9591bbb4","component":"channel","state":"$designerCreateModel","action":"function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"r12c4e1d6cf1cf0e":{"_id":"r12c4e1d6cf1cf0e","component":"channel","state":"$editorUpdateModel","action":"function $editorUpdateModel(id, model) { \n if (model && model._name) {\n this.require('logger').debug('analyzing ' + model._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (model && model._name) {\n this.require('logger').debug(model._name + ' has been updated');\n }\n}","useCoreAPI":false,"core":true},"x1eb4c1d03b1ee34":{"_id":"x1eb4c1d03b1ee34","component":"channel","state":"$designerUpdateModel","action":"function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w1c68e1c7aa19326":{"_id":"w1c68e1c7aa19326","component":"channel","state":"$designerDeleteModel","action":"function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n var search = $db._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\n}","useCoreAPI":true,"core":true},"x1f6bc11b3816de0":{"_id":"x1f6bc11b3816de0","component":"channel","state":"$designerCreateType","action":"function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been created');\n }\n}","useCoreAPI":false,"core":true},"m1ff4f11d19164c0":{"_id":"m1ff4f11d19164c0","component":"channel","state":"$editorUpdateType","action":"function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been updated');\n }\n}","useCoreAPI":false,"core":true},"u1e8bd17bdc15d6a":{"_id":"u1e8bd17bdc15d6a","component":"channel","state":"$editorDeleteType","action":"function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"k18a311f76f1ff2a":{"_id":"k18a311f76f1ff2a","component":"channel","state":"$designerDeleteType","action":"function $designerDeleteType(id) { \n var search = $db._Type.find({ 'name': id });\n var type = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n this.require('logger').level('warn');\n $db._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type) {\n this.require('logger').debug(type.name + ' type has been deleted');\n }\n}","useCoreAPI":true,"core":true},"i1fe2e1f8fe1f3b7":{"_id":"i1fe2e1f8fe1f3b7","component":"channel","state":"$designerCreateComponent","action":"function $designerCreateComponent(collection, component) { \n if ($db[collection]) {\n $db[collection].insert(component);\t\n } else {\n if (component && component._id) {\n this.require('logger').debug('can not create \\'' + component._id + '\\' component: ' + collection +' model does not exit');\n }\n }\n}","useCoreAPI":true,"core":true},"e1cc381f58818dd4":{"_id":"e1cc381f58818dd4","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n if ($db[collection]) {\n $db[collection].update({ '_id': id }, component, { 'upsert': true });\t\n } else {\n this.require('logger').debug('can not update \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}","useCoreAPI":true,"core":true},"o1ed5a1768c181b2":{"_id":"o1ed5a1768c181b2","component":"channel","state":"$editorDeleteComponent","action":"function $editorDeleteComponent(id, collection) { \n if ($db[collection]) {\n $db[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}","useCoreAPI":true,"core":true},"t18fe213b0718b38":{"_id":"t18fe213b0718b38","component":"channel","state":"$designerDeleteComponent","action":"function $designerDeleteComponent(id, collection) { \n if ($db[collection]) {\n $db[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}","useCoreAPI":true,"core":true},"p1524e1d2c414a17":{"_id":"p1524e1d2c414a17","component":"channel","state":"$designerCreateBehavior","action":"function $designerCreateBehavior(behavior) { \n $db._Behavior.insert(behavior);\t\n \n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been created');\n}","useCoreAPI":true,"core":true},"m154451abb8103f1":{"_id":"m154451abb8103f1","component":"channel","state":"$editorUpdateBehavior","action":"function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require('logger').debug(behavior.state + ' behavior of the system has been updated');\n this.require('logger').debug('restarting the system...');\n this.require(behavior.component).start();\n } else {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been updated');\n }\n }\telse {\n this.require('logger').debug('can not update ' + behavior.state + ' behavior (\\'' + behavior.component + '\\' component): the component does not exist');\n }\n}","useCoreAPI":false,"core":true},"q131b819d531053f":{"_id":"q131b819d531053f","component":"channel","state":"$editorDeleteBehavior","action":"function $editorDeleteBehavior(id) { \n $db._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h1214316cb61ea28":{"_id":"h1214316cb61ea28","component":"channel","state":"$designerDeleteBehavior","action":"function $designerDeleteBehavior(id) { \n var search = $db._Behavior.find({ '_id': id });\n var behavior = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n $db._Behavior.remove({ '_id': id });\n \n if (behavior) {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been deleted');\n }\n}","useCoreAPI":true,"core":true},"h109eb1b4ed148fd":{"_id":"h109eb1b4ed148fd","component":"channel","state":"$designerSync","action":"function $designerSync() { \n var designerWindow = this.require('admin').designerWindow(),\n system = null;\n\n this.require('admin').designerWindow(null);\n system = JSON.parse($db.exportSystem());\n designerWindow = this.require('admin').designerWindow(designerWindow);\n\n this.$appLoadSystem(system);\t\n}","useCoreAPI":true,"core":true},"w1a9961205712671":{"_id":"w1a9961205712671","component":"db","state":"insert","action":"function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}","useCoreAPI":false,"core":true},"j122701697c19935":{"_id":"j122701697c19935","component":"db","state":"remove","action":"function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}","useCoreAPI":false,"core":true},"t118f61f6d0127e4":{"_id":"t118f61f6d0127e4","component":"db","state":"update","action":"function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}","useCoreAPI":false,"core":true},"s1486715d9315862":{"_id":"s1486715d9315862","component":"channel","state":"init","action":"function init(conf) { \n window.addEventListener('message', function message(event) {\n var data = null;\n try {\n data = JSON.parse(event.data);\n if (data &&\n typeof data.event !== 'undefined' &&\n typeof data.from !== 'undefined' &&\n typeof data.data !== 'undefined') {\n if (this.require('admin').designerWindow) {\n this.require('admin').designerWindow(event.source);\n }\n $db._Message.insert(data);\n }\n } catch (e) {\n }\n }.bind(this), false);\t\n}","useCoreAPI":true,"core":true},"e10ba11978d122c5":{"_id":"e10ba11978d122c5","component":"admin","state":"init","action":"function init(conf) { \n // for jquery compatibility in electron\n if (typeof global !== 'undefined' && typeof window !== 'undefined') {\n delete module;\n }\n}","useCoreAPI":false,"core":true},"i139a61d4aa1bea7":{"_id":"i139a61d4aa1bea7","component":"logger","state":"info","action":"function info(message) { \n if (this.level() === 'info' || this.level() === 'debug') {\n var date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogInfo('[' + time + '] ' + message);\n }\t\n}","useCoreAPI":false,"core":true},"r1c1841a98e1bc15":{"_id":"r1c1841a98e1bc15","component":"logger","state":"debug","action":"function debug(message) { \n if (this.level() === 'debug') {\n var date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogDebug('[' + time + '] ' + message);\n }\t\n}","useCoreAPI":false,"core":true},"m1d30414ed912a2a":{"_id":"m1d30414ed912a2a","component":"logger","state":"error","action":"function error(message) { \n var date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogError('[' + time + '] ' + message);\n}","useCoreAPI":false,"core":true},"d1d19f1ae9a12118":{"_id":"d1d19f1ae9a12118","component":"logger","state":"warn","action":"function warn(message) { \n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\n var date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogWarn('[' + time + '] ' + message);\n }\n}","useCoreAPI":false,"core":true},"a172ce13a3e1e8ff":{"_id":"a172ce13a3e1e8ff","component":"channel","state":"$designerSetSystem","action":"function $designerSetSystem(system) { \n this.require('logger').level('info');\n\tthis.require('runtime').install(system);\n}","useCoreAPI":false,"core":true}},"types":{},"components":{"_Admin":{"admin":{"_id":"admin","_core":true,"designerWindow":null}},"_Channel":{"channel":{"_id":"channel"}},"_Database":{"db":{"_id":"db"}},"_Logger":{"logger":{"_id":"logger","level":"warn"}}},"_id":"18ed81de331252c"} \ No newline at end of file +{ + "name": "mode-admin", + "master": false, + "version": "1.0.0", + "description": "Enable connection to System Designer", + "schemas": { + "1723516a30132ac": { + "_name": "_Database", + "_inherit": ["_Component"], + "_core": true, + "insert": "event", + "update": "event", + "remove": "event", + "_id": "1723516a30132ac" + }, + "10374180581a41f": { + "_id": "10374180581a41f", + "_name": "_Admin", + "_inherit": ["_Component"], + "_core": true, + "designerWindow": "property" + }, + "104ad1f48518376": { + "_id": "104ad1f48518376", + "_name": "_Channel", + "_core": true, + "$editorUpdateSystem": "event", + "$editorUpdateSchema": "event", + "$editorUpdateSchemaId": "event", + "$editorUpdateSchemaName": "event", + "$editorUpdateModel": "event", + "$editorUpdateModelId": "event", + "$editorUpdateType": "event", + "$editorDeleteType": "event", + "$editorUpdateBehavior": "event", + "$editorDeleteBehavior": "event", + "$editorUpdateComponent": "event", + "$editorUpdateComponentId": "event", + "$editorDeleteComponent": "event", + "$appLogDebug": "event", + "$appLogInfo": "event", + "$appLogWarn": "event", + "$appLogError": "event", + "$appLoadSystem": "event", + "$designerSync": "event", + "$designerCreateBehavior": "event", + "$designerCreateComponent": "event", + "$designerCreateType": "event", + "$designerCreateSchema": "event", + "$designerCreateModel": "event", + "$designerDeleteSchema": "event", + "$designerDeleteModel": "event", + "$designerDeleteType": "event", + "$designerDeleteBehavior": "event", + "$designerDeleteComponent": "event", + "$designerUpdateComponent": "event", + "$designerUpdateModel": "event", + "$designerUpdateBehavior": "event", + "$designerSetSystem": "event", + "$runtimeCreateComponent": "event", + "$runtimeDeleteComponent": "event", + "$runtimeUpdateComponent": "event", + "send": "event" + }, + "1268f1dddd1fea7": { + "_name": "_Logger", + "_core": true, + "level": "property", + "debug": "method", + "info": "method", + "warn": "method", + "error": "method", + "_id": "1268f1dddd1fea7" + } + }, + "models": { + "18a51169d7112d4": { + "_name": "_Database", + "_core": true, + "insert": { "params": [{ "name": "event", "type": "dbInsertEvent" }] }, + "update": { "params": [{ "name": "event", "type": "dbUpdateEvent" }] }, + "remove": { "params": [{ "name": "event", "type": "dbRemoveEvent" }] }, + "_id": "18a51169d7112d4" + }, + "138a81fa1f16435": { + "_id": "138a81fa1f16435", + "_name": "_Admin", + "_inherit": ["_Component"], + "_core": true, + "designerWindow": { + "type": "object", + "readOnly": false, + "mandatory": false, + "default": null + } + }, + "135c71078810af2": { + "_id": "135c71078810af2", + "_name": "_Channel", + "_inherit": ["_Component"], + "_core": true, + "$editorUpdateSchemaName": { + "params": [ + { "name": "name", "type": "string" }, + { "name": "id", "type": "string" } + ] + }, + "$designerSync": {}, + "$appLoadSystem": { "params": [{ "name": "system", "type": "object" }] }, + "$designerCreateBehavior": { + "params": [{ "name": "behavior", "type": "object" }] + }, + "$editorUpdateBehavior": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "behavior", "type": "object" } + ] + }, + "$designerUpdateBehavior": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "behavior", "type": "object" } + ] + }, + "$editorDeleteBehavior": { + "params": [{ "name": "id", "type": "string" }] + }, + "$designerDeleteBehavior": { + "params": [{ "name": "id", "type": "string" }] + }, + "$designerCreateComponent": { + "params": [ + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$editorUpdateComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$editorUpdateComponentId": { + "params": [ + { "name": "oldId", "type": "string" }, + { "name": "newId", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$designerUpdateComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$editorDeleteComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$designerDeleteComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$designerDeleteType": { "params": [{ "name": "id", "type": "string" }] }, + "$designerCreateType": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "type", "type": "object" } + ] + }, + "$editorUpdateType": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "type", "type": "object" } + ] + }, + "$editorDeleteType": { "params": [{ "name": "id", "type": "string" }] }, + "$designerCreateSchema": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "schema", "type": "object" } + ] + }, + "$editorUpdateSchema": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "schema", "type": "object" } + ] + }, + "$editorUpdateSchemaId": { + "params": [ + { "name": "oldId", "type": "string" }, + { "name": "newId", "type": "string" } + ] + }, + "$designerDeleteSchema": { + "params": [{ "name": "id", "type": "string" }] + }, + "$designerCreateModel": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "model", "type": "object" } + ] + }, + "$editorUpdateModel": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "model", "type": "object" } + ] + }, + "$designerUpdateModel": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "model", "type": "object" } + ] + }, + "$editorUpdateModelId": { + "params": [ + { "name": "oldId", "type": "string" }, + { "name": "newId", "type": "string" } + ] + }, + "$designerDeleteModel": { + "params": [{ "name": "id", "type": "string" }] + }, + "$editorUpdateSystem": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "system", "type": "object" } + ] + }, + "$appLogDebug": { "params": [{ "name": "message", "type": "string" }] }, + "$appLogInfo": { "params": [{ "name": "message", "type": "string" }] }, + "$appLogWarn": { "params": [{ "name": "message", "type": "string" }] }, + "$appLogError": { "params": [{ "name": "message", "type": "string" }] }, + "$runtimeCreateComponent": { + "params": [ + { "name": "collection", "type": "string" }, + { "name": "component", "type": "object" } + ] + }, + "$runtimeDeleteComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" } + ] + }, + "$runtimeUpdateComponent": { + "params": [ + { "name": "id", "type": "string" }, + { "name": "collection", "type": "string" }, + { "name": "field", "type": "string" }, + { "name": "value", "type": "any" } + ] + }, + "send": { "params": [{ "name": "message", "type": "message" }] }, + "$designerSetSystem": { + "params": [ + { + "name": "system", + "type": "object", + "mandatory": false, + "default": {} + } + ] + } + }, + "16b9d1ac2216ffe": { + "_id": "16b9d1ac2216ffe", + "_name": "_Logger", + "_core": true, + "level": { + "type": "log", + "readOnly": false, + "mandatory": false, + "default": "warn" + }, + "debug": { "params": [{ "name": "message", "type": "any" }] }, + "info": { "params": [{ "name": "message", "type": "any" }] }, + "warn": { "params": [{ "name": "message", "type": "any" }] }, + "error": { "params": [{ "name": "message", "type": "any" }] } + } + }, + "behaviors": { + "g198c91f8601d02f": { + "_id": "g198c91f8601d02f", + "component": "channel", + "state": "send", + "action": "function send(message) { \n if (this.require('admin').designerWindow()) {\n this.require('admin').designerWindow().postMessage(JSON.stringify(message), '*');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "h1b3891699319be4": { + "_id": "h1b3891699319be4", + "component": "channel", + "state": "$designerCreateSchema", + "action": "function $designerCreateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been created');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "w161ae196d51f585": { + "_id": "w161ae196d51f585", + "component": "channel", + "state": "$editorUpdateSchema", + "action": "function $editorUpdateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n \n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been updated');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "x12449136a811be2": { + "_id": "x12449136a811be2", + "component": "channel", + "state": "$designerDeleteSchema", + "action": "function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n \n this.require('logger').debug(modelName + ' class has been deleted');\n}", + "useCoreAPI": true, + "core": true + }, + "h103b01d9591bbb4": { + "_id": "h103b01d9591bbb4", + "component": "channel", + "state": "$designerCreateModel", + "action": "function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "r12c4e1d6cf1cf0e": { + "_id": "r12c4e1d6cf1cf0e", + "component": "channel", + "state": "$editorUpdateModel", + "action": "function $editorUpdateModel(id, model) { \n if (model && model._name) {\n this.require('logger').debug('analyzing ' + model._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (model && model._name) {\n this.require('logger').debug(model._name + ' has been updated');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "x1eb4c1d03b1ee34": { + "_id": "x1eb4c1d03b1ee34", + "component": "channel", + "state": "$designerUpdateModel", + "action": "function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": false, + "core": true + }, + "w1c68e1c7aa19326": { + "_id": "w1c68e1c7aa19326", + "component": "channel", + "state": "$designerDeleteModel", + "action": "function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\n}", + "useCoreAPI": true, + "core": true + }, + "x1f6bc11b3816de0": { + "_id": "x1f6bc11b3816de0", + "component": "channel", + "state": "$designerCreateType", + "action": "function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been created');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "m1ff4f11d19164c0": { + "_id": "m1ff4f11d19164c0", + "component": "channel", + "state": "$editorUpdateType", + "action": "function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been updated');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "u1e8bd17bdc15d6a": { + "_id": "u1e8bd17bdc15d6a", + "component": "channel", + "state": "$editorDeleteType", + "action": "function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", + "useCoreAPI": true, + "core": true + }, + "k18a311f76f1ff2a": { + "_id": "k18a311f76f1ff2a", + "component": "channel", + "state": "$designerDeleteType", + "action": "function $designerDeleteType(id) { \n let search = $db.collections._Type.find({ 'name': id });\n let type = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type) {\n this.require('logger').debug(type.name + ' type has been deleted');\n }\n}", + "useCoreAPI": true, + "core": true + }, + "i1fe2e1f8fe1f3b7": { + "_id": "i1fe2e1f8fe1f3b7", + "component": "channel", + "state": "$designerCreateComponent", + "action": "function $designerCreateComponent(collection, component) { \n if ($db.collections[collection]) {\n $db.collections[collection].insert(component);\t\n } else {\n if (component && component._id) {\n this.require('logger').debug('can not create \\'' + component._id + '\\' component: ' + collection +' model does not exit');\n }\n }\n}", + "useCoreAPI": true, + "core": true + }, + "e1cc381f58818dd4": { + "_id": "e1cc381f58818dd4", + "component": "channel", + "state": "$editorUpdateComponent", + "action": "function $editorUpdateComponent(id, collection, component) { \n if ($db.collections[collection]) {\n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n } else {\n this.require('logger').debug('can not update \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}", + "useCoreAPI": true, + "core": true + }, + "o1ed5a1768c181b2": { + "_id": "o1ed5a1768c181b2", + "component": "channel", + "state": "$editorDeleteComponent", + "action": "function $editorDeleteComponent(id, collection) { \n if ($db.collections[collection]) {\n $db.collections[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}", + "useCoreAPI": true, + "core": true + }, + "t18fe213b0718b38": { + "_id": "t18fe213b0718b38", + "component": "channel", + "state": "$designerDeleteComponent", + "action": "function $designerDeleteComponent(id, collection) { \n if ($db.collections[collection]) {\n $db.collections[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}", + "useCoreAPI": true, + "core": true + }, + "p1524e1d2c414a17": { + "_id": "p1524e1d2c414a17", + "component": "channel", + "state": "$designerCreateBehavior", + "action": "function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n \n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been created');\n}", + "useCoreAPI": true, + "core": true + }, + "m154451abb8103f1": { + "_id": "m154451abb8103f1", + "component": "channel", + "state": "$editorUpdateBehavior", + "action": "function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require('logger').debug(behavior.state + ' behavior of the system has been updated');\n this.require('logger').debug('restarting the system...');\n this.require(behavior.component).start();\n } else {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been updated');\n }\n }\telse {\n this.require('logger').debug('can not update ' + behavior.state + ' behavior (\\'' + behavior.component + '\\' component): the component does not exist');\n }\n}", + "useCoreAPI": false, + "core": true + }, + "q131b819d531053f": { + "_id": "q131b819d531053f", + "component": "channel", + "state": "$editorDeleteBehavior", + "action": "function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}", + "useCoreAPI": true, + "core": true + }, + "h1214316cb61ea28": { + "_id": "h1214316cb61ea28", + "component": "channel", + "state": "$designerDeleteBehavior", + "action": "function $designerDeleteBehavior(id) { \n let search = $db.collections._Behavior.find({ '_id': id });\n let behavior = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n $db.collections._Behavior.remove({ '_id': id });\n \n if (behavior) {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been deleted');\n }\n}", + "useCoreAPI": true, + "core": true + }, + "h109eb1b4ed148fd": { + "_id": "h109eb1b4ed148fd", + "component": "channel", + "state": "$designerSync", + "action": "function $designerSync() { \n let designerWindow = this.require('admin').designerWindow(),\n system = null;\n\n this.require('admin').designerWindow(null);\n system = JSON.parse($db.exportSystem());\n designerWindow = this.require('admin').designerWindow(designerWindow);\n\n this.$appLoadSystem(system);\t\n}", + "useCoreAPI": true, + "core": true + }, + "w1a9961205712671": { + "_id": "w1a9961205712671", + "component": "db", + "state": "insert", + "action": "function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "j122701697c19935": { + "_id": "j122701697c19935", + "component": "db", + "state": "remove", + "action": "function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "t118f61f6d0127e4": { + "_id": "t118f61f6d0127e4", + "component": "db", + "state": "update", + "action": "function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "s1486715d9315862": { + "_id": "s1486715d9315862", + "component": "channel", + "state": "init", + "action": "function init(conf) { \n window.addEventListener('message', function message(event) {\n let data = null;\n try {\n data = JSON.parse(event.data);\n if (data &&\n typeof data.event !== 'undefined' &&\n typeof data.from !== 'undefined' &&\n typeof data.data !== 'undefined') {\n if (this.require('admin').designerWindow) {\n this.require('admin').designerWindow(event.source);\n }\n $db.collections._Message.insert(data);\n }\n } catch (e) {\n }\n }.bind(this), false);\t\n}", + "useCoreAPI": true, + "core": true + }, + "e10ba11978d122c5": { + "_id": "e10ba11978d122c5", + "component": "admin", + "state": "init", + "action": "function init(conf) { \n // for jquery compatibility in electron\n if (typeof global !== 'undefined' && typeof window !== 'undefined') {\n delete module;\n }\n}", + "useCoreAPI": false, + "core": true + }, + "i139a61d4aa1bea7": { + "_id": "i139a61d4aa1bea7", + "component": "logger", + "state": "info", + "action": "function info(message) { \n if (this.level() === 'info' || this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogInfo('[' + time + '] ' + message);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "r1c1841a98e1bc15": { + "_id": "r1c1841a98e1bc15", + "component": "logger", + "state": "debug", + "action": "function debug(message) { \n if (this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogDebug('[' + time + '] ' + message);\n }\t\n}", + "useCoreAPI": false, + "core": true + }, + "m1d30414ed912a2a": { + "_id": "m1d30414ed912a2a", + "component": "logger", + "state": "error", + "action": "function error(message) { \n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogError('[' + time + '] ' + message);\n}", + "useCoreAPI": false, + "core": true + }, + "d1d19f1ae9a12118": { + "_id": "d1d19f1ae9a12118", + "component": "logger", + "state": "warn", + "action": "function warn(message) { \n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogWarn('[' + time + '] ' + message);\n }\n}", + "useCoreAPI": false, + "core": true + }, + "a172ce13a3e1e8ff": { + "_id": "a172ce13a3e1e8ff", + "component": "channel", + "state": "$designerSetSystem", + "action": "function $designerSetSystem(system) { \n this.require('logger').level('info');\n\tthis.require('runtime').install(system);\n}", + "useCoreAPI": false, + "core": true + } + }, + "types": {}, + "components": { + "_Admin": { + "admin": { "_id": "admin", "_core": true, "designerWindow": null } + }, + "_Channel": { "channel": { "_id": "channel" } }, + "_Database": { "db": { "_id": "db" } }, + "_Logger": { "logger": { "_id": "logger", "level": "warn" } } + }, + "_id": "18ed81de331252c" +} diff --git a/extensions/mode-dev.json b/extensions/mode-dev.json index 14bc1fb..e9eda4e 100755 --- a/extensions/mode-dev.json +++ b/extensions/mode-dev.json @@ -1 +1,21 @@ -{"name":"mode-dev","master":false,"version":"1.0.0","description":"Development mode","schemas":{},"models":{},"behaviors":{"y1c59d1de591d81e":{"_id":"y1c59d1de591d81e","component":"z1f9151698514d13","state":"start","action":"function start() {\n if (typeof document !== 'undefined') {\n runtime.require('logger').level('debug');\n \n document.addEventListener('dragenter', function dragenter(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function dragover(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function drop(e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function onload(event) {\n json += event.target.result;\n };\n reader.onloadend = function onloadend() {\n try {\n var sys = JSON.parse(json);\n runtime.install(sys);\n runtime.require('logger').info('system ' + sys._id + ' has been installed.');\n } catch (e) {\n runtime.require('logger').warn('try to install an invalid system.');\n }\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n}","useCoreAPI":false,"core":true}},"types":{},"components":{},"_id":"z1f9151698514d13"} \ No newline at end of file +{ + "name": "mode-dev", + "master": false, + "version": "1.0.0", + "description": "Development mode", + "schemas": {}, + "models": {}, + "behaviors": { + "y1c59d1de591d81e": { + "_id": "y1c59d1de591d81e", + "component": "z1f9151698514d13", + "state": "start", + "action": "function start() {\n if (typeof document !== 'undefined') {\n runtime.require('logger').level('debug');\n \n document.addEventListener('dragenter', function dragenter(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function dragover(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function drop(e) {\n e.stopPropagation();\n e.preventDefault();\n let files = e.dataTransfer.files;\n let reader = new FileReader();\n let json = '';\n reader.onload = function onload(event) {\n json += event.target.result;\n };\n reader.onloadend = function onloadend() {\n try {\n let sys = JSON.parse(json);\n runtime.install(sys);\n runtime.require('logger').info('system ' + sys._id + ' has been installed.');\n } catch (e) {\n runtime.require('logger').warn('try to install an invalid system.');\n }\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n}", + "useCoreAPI": false, + "core": true + } + }, + "types": {}, + "components": {}, + "_id": "z1f9151698514d13" +} diff --git a/extensions/storage.json b/extensions/storage.json index 65b5af4..664124f 100755 --- a/extensions/storage.json +++ b/extensions/storage.json @@ -1 +1,102 @@ -{"name":"storage","master":false,"version":"1.0.0","description":"Storage","schemas":{"12fa8181ce127a0":{"_id":"12fa8181ce127a0","_name":"_Storage","_inherit":["_Component"],"_core":true,"store":"property","get":"method","set":"method","remove":"method","clear":"method","changed":"event"}},"models":{"1f4141671514c2c":{"_id":"1f4141671514c2c","_name":"_Storage","get":{"params":[{"name":"key","type":"string","mandatory":true,"default":""}]},"set":{"params":[{"name":"key","type":"string","mandatory":true,"default":""},{"name":"value","type":"any","mandatory":true,"default":null}]},"changed":{"params":[{"name":"obj","type":"object","mandatory":true,"default":{}}]},"clear":{},"remove":{"params":[{"name":"key","type":"string","mandatory":true,"default":""}]},"_core":true,"store":{"type":"object","readOnly":false,"mandatory":false,"default":{}}}},"behaviors":{"1ca0f1020412d4f":{"_id":"1ca0f1020412d4f","component":"_Storage","state":"get","action":"function get(key) {\n var result = null;\n\n if (typeof this.store()[key]) {\n result = this.store()[key];\n }\n return result;\n}","useCoreAPI":false,"core":true},"16764100d51b5f8":{"_id":"16764100d51b5f8","component":"_Storage","state":"set","action":"function set(key, value) {\n var store = this.store(),\n item = {};\n\n store[key] = value;\n this.store(store);\n\n item[key] = JSON.stringify(value);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.setItem(key, JSON.stringify(value));\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true},"134b616b1016f60":{"_id":"134b616b1016f60","component":"_Storage","state":"clear","action":"function clear() {\n this.store({});\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.clear();\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true},"14c7f1a8431b3d5":{"_id":"14c7f1a8431b3d5","component":"_Storage","state":"init","action":"function init(conf) {\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n // init \n var keys = Object.keys(localStorage),\n store = {},\n i = 0,\n length = 0;\n\n length = keys.length;\n for (i = 0; i < length; i++) {\n try {\n store[keys[i]] = JSON.parse(localStorage[keys[i]]);\n } catch (e) { }\n }\n this.store(store);\n\n // event\n window.addEventListener('storage', function (e) {\n var obj = {},\n store = this.store();\n\n try {\n store[e.key] = JSON.parse(e.newValue);\n this.store(store);\n\n obj[e.key] = {};\n obj[e.key].oldValue = JSON.parse(e.oldValue);\n obj[e.key].newValue = JSON.parse(e.newValue);\n\n this.changed(obj);\n } catch (e) { }\n }.bind(this));\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true},"1a4921ac7112bd4":{"_id":"1a4921ac7112bd4","component":"_Storage","state":"remove","action":"function remove(key) {\n var store = this.store();\n\n delete store[key];\n this.store(store);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.removeItem(key);\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true}},"types":{},"components":{"_Storage":{"storage":{"_id":"storage","_core":true}}},"_id":"15de81d295153db"} \ No newline at end of file +{ + "name": "storage", + "master": false, + "version": "1.0.0", + "description": "Storage", + "schemas": { + "12fa8181ce127a0": { + "_id": "12fa8181ce127a0", + "_name": "_Storage", + "_inherit": ["_Component"], + "_core": true, + "store": "property", + "get": "method", + "set": "method", + "remove": "method", + "clear": "method", + "changed": "event" + } + }, + "models": { + "1f4141671514c2c": { + "_id": "1f4141671514c2c", + "_name": "_Storage", + "get": { + "params": [ + { "name": "key", "type": "string", "mandatory": true, "default": "" } + ] + }, + "set": { + "params": [ + { "name": "key", "type": "string", "mandatory": true, "default": "" }, + { "name": "value", "type": "any", "mandatory": true, "default": null } + ] + }, + "changed": { + "params": [ + { "name": "obj", "type": "object", "mandatory": true, "default": {} } + ] + }, + "clear": {}, + "remove": { + "params": [ + { "name": "key", "type": "string", "mandatory": true, "default": "" } + ] + }, + "_core": true, + "store": { + "type": "object", + "readOnly": false, + "mandatory": false, + "default": {} + } + } + }, + "behaviors": { + "1ca0f1020412d4f": { + "_id": "1ca0f1020412d4f", + "component": "_Storage", + "state": "get", + "action": "function get(key) {\n let result = null;\n\n if (typeof this.store()[key]) {\n result = this.store()[key];\n }\n return result;\n}", + "useCoreAPI": false, + "core": true + }, + "16764100d51b5f8": { + "_id": "16764100d51b5f8", + "component": "_Storage", + "state": "set", + "action": "function set(key, value) {\n let store = this.store(),\n item = {};\n\n store[key] = value;\n this.store(store);\n\n item[key] = JSON.stringify(value);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.setItem(key, JSON.stringify(value));\n break;\n default:\n break;\n }\n } catch (e) { }\n}", + "useCoreAPI": false, + "core": true + }, + "134b616b1016f60": { + "_id": "134b616b1016f60", + "component": "_Storage", + "state": "clear", + "action": "function clear() {\n this.store({});\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.clear();\n break;\n default:\n break;\n }\n } catch (e) { }\n}", + "useCoreAPI": false, + "core": true + }, + "14c7f1a8431b3d5": { + "_id": "14c7f1a8431b3d5", + "component": "_Storage", + "state": "init", + "action": "function init(conf) {\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n // init \n let keys = Object.keys(localStorage),\n store = {},\n i = 0,\n length = 0;\n\n length = keys.length;\n for (i = 0; i < length; i++) {\n try {\n store[keys[i]] = JSON.parse(localStorage[keys[i]]);\n } catch (e) { }\n }\n this.store(store);\n\n // event\n window.addEventListener('storage', function (e) {\n let obj = {},\n store = this.store();\n\n try {\n store[e.key] = JSON.parse(e.newValue);\n this.store(store);\n\n obj[e.key] = {};\n obj[e.key].oldValue = JSON.parse(e.oldValue);\n obj[e.key].newValue = JSON.parse(e.newValue);\n\n this.changed(obj);\n } catch (e) { }\n }.bind(this));\n break;\n default:\n break;\n }\n } catch (e) { }\n}", + "useCoreAPI": false, + "core": true + }, + "1a4921ac7112bd4": { + "_id": "1a4921ac7112bd4", + "component": "_Storage", + "state": "remove", + "action": "function remove(key) {\n let store = this.store();\n\n delete store[key];\n this.store(store);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.removeItem(key);\n break;\n default:\n break;\n }\n } catch (e) { }\n}", + "useCoreAPI": false, + "core": true + } + }, + "types": {}, + "components": { + "_Storage": { "storage": { "_id": "storage", "_core": true } } + }, + "_id": "15de81d295153db" +} diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index b0ecf4c..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * System Runtime - * - * https://designfirst.io/systemruntime/ - * - * Copyright 2022 Erwan Carriou - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -module.exports = config => { - const browsers = [ - 'ChromeHeadless' - ]; - let reporters = [ - 'progress', - 'coverage' - ]; - - if (process.env.TRAVIS) { - reporters = [ - 'progress', - 'coverage', - 'dots' - ]; - } - - config.set({ - basePath: './', - frameworks: [ - 'mocha', - 'chai' - ], - files: [ - 'dist/system-runtime.min.js', - 'test/runtime/runtime-spec.js', - 'test/runtime/component-spec.js', - 'test/runtime/metamodel-spec.js', - 'test/runtime/database-spec.js', - 'test/runtime/system-spec.js', - 'test/runtime/mson-spec.js' - ], - reporters: reporters, - preprocessors: { - 'dist/system-runtime.min.js': [ - 'coverage' - ] - }, - colors: true, - autoWatch: true, - plugins: [ - 'karma-coverage', - 'karma-script-launcher', - 'karma-chrome-launcher', - 'karma-mocha', - 'karma-chai' - ], - singleRun: true, - browsers: browsers - }); -}; diff --git a/package-lock.json b/package-lock.json index 42e85f1..bfeac15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,135 +1,148 @@ { "name": "system-runtime", - "version": "5.1.0", + "version": "6.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "system-runtime", - "version": "5.1.0", + "version": "6.0.0", "license": "Apache-2.0", "devDependencies": { + "@rollup/plugin-terser": "^0.1.0", "chai": "4.3.6", - "coveralls": "3.1.1", + "cypress": "10.11.0", + "eslint": "8.26.0", + "eslint-plugin-mocha": "10.1.0", "grunt": "1.5.3", - "grunt-browserify": "6.0.0", "grunt-cli": "1.4.3", "grunt-contrib-clean": "2.0.1", "grunt-contrib-concat": "2.1.0", - "grunt-contrib-uglify": "5.2.2", - "grunt-contrib-watch": "1.1.0", - "grunt-eslint": "24.0.0", "grunt-json-merge": "0.2.2", - "grunt-karma": "4.0.2", - "grunt-mocha-istanbul": "5.0.2", "husky": "8.0.1", - "istanbul": "0.4.5", - "karma": "6.4.0", - "karma-chai": "0.1.0", - "karma-chrome-launcher": "3.1.1", - "karma-coverage": "2.2.0", - "karma-mocha": "2.0.1", - "karma-script-launcher": "1.0.0", "lint-staged": "13.0.3", "load-grunt-tasks": "5.1.0", - "mocha": "10.0.0", - "prettier": "2.7.1" + "mocha": "10.1.0", + "prettier": "2.7.1", + "rollup": "3.2.3", + "serve": "14.0.1" } }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, + "optional": true, "engines": { - "node": ">=6.0.0" + "node": ">=0.1.90" } }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "node_modules/@cypress/request": { + "version": "2.88.10", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", + "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "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.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" }, "engines": { - "node": ">=6.9.0" + "node": ">= 6" } }, - "node_modules/@babel/compat-data": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", - "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", + "node_modules/@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, - "engines": { - "node": ">=6.9.0" + "dependencies": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + } + }, + "node_modules/@cypress/xvfb/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" } }, - "node_modules/@babel/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", - "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", + "node_modules/@eslint/eslintrc": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.0", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.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": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" + "url": "https://opencollective.com/eslint" } }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.1" + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" } }, - "node_modules/@babel/core/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "dependencies": { - "@babel/types": "^7.19.0", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, "engines": { - "node": ">=6.9.0" + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "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==", + "dev": true + }, + "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", @@ -143,2910 +156,876 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", - "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true, - "dependencies": { - "@babel/compat-data": "^7.19.0", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" - }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - }, - "engines": { - "node": ">=6.9.0" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "node_modules/@rollup/plugin-terser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", + "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "terser": "^5.15.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.x || ^3.x" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } + "node_modules/@types/node": { + "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", + "dev": true + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true }, - "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "node_modules/@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, - "engines": { - "node": ">=6.9.0" + "optional": true, + "dependencies": { + "@types/node": "*" } }, - "node_modules/@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "node_modules/@zeit/schemas": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", + "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.6" } }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "node_modules/acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=6.9.0" + "node": ">=0.4.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "color-name": "1.1.3" + "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/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, - "engines": { - "node": ">=0.8.0" + "dependencies": { + "string-width": "^4.1.0" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "type-fest": "^0.21.3" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@babel/parser": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", - "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, "engines": { - "node": ">=6.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" - }, "engines": { - "node": ">=6.9.0" + "node": ">=8" } }, - "node_modules/@babel/traverse": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", - "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.0", - "@babel/types": "^7.19.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true, - "engines": { - "node": ">=0.1.90" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", - "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.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/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { + "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - }, "engines": { - "node": ">=10.10.0" + "node": ">=0.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": ">=8" } }, - "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==", - "dev": true - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" + "safer-buffer": "~2.1.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, "engines": { - "node": ">=6.0.0" + "node": ">=0.8" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "node": "*" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, "engines": { - "node": ">= 8" + "node": ">=8" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, "engines": { - "node": ">= 8" + "node": ">= 4.0.0" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, "engines": { - "node": ">= 8" + "node": "*" } }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, - "node_modules/@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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" + } + ] }, - "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.7.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", - "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==", - "dev": true - }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-node/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "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/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" + "tweetnacl": "^0.14.3" } }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", - "dev": true - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", - "dev": true, - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "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" - } - ] - }, - "node_modules/base64id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", - "dev": true, - "engines": { - "node": "^4.5.0 || >= 5.9" - } - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/body": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", - "integrity": "sha512-chUsBxGRtuElD6fmw1gHLpvnKdVLK302peeFa9ZqAEk8TyzZ3fygLyUEDDPTJvL9+Bor0dIwn6ePOsRM2y0zQQ==", - "dev": true, - "dependencies": { - "continuable-cache": "^0.3.1", - "error": "^7.0.0", - "raw-body": "~1.1.0", - "safe-json-parse": "~1.0.1" - } - }, - "node_modules/body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "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.10.3", - "raw-body": "2.5.1", - "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", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/body/node_modules/bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", - "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==", - "dev": true - }, - "node_modules/body/node_modules/raw-body": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", - "integrity": "sha512-WmJJU2e9Y6M5UzTOkHaM7xJGAPQD8PNzx3bAd2+uhZAim6wDk6dAZxPVYLF67XhbR4hmKGh33Lpmh4XWrCH5Mg==", - "dev": true, - "dependencies": { - "bytes": "1", - "string_decoder": "0.10" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/body/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "node_modules/browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "dependencies": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - }, - "bin": { - "browser-pack": "bin/cmd.js" - } - }, - "node_modules/browser-resolve": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", - "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", - "dev": true, - "dependencies": { - "resolve": "^1.17.0" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/browserify": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.0.tgz", - "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", - "dev": true, - "dependencies": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^2.0.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.1", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^3.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.2.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.2.3", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "^1.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum-object": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^3.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.12.0", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cache-api": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/browserify-cache-api/-/browserify-cache-api-3.0.2.tgz", - "integrity": "sha512-14YNbboSgSHY5QNZSLwlGYB7OuBuXS7gMyR2gfBjdS4JYcWB9BqyKhraQG/VW2W5ZhjkC/C8LZ38sP3bmbmeNA==", - "dev": true, - "dependencies": { - "async": "^2.6.4", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-incremental": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/browserify-incremental/-/browserify-incremental-3.1.1.tgz", - "integrity": "sha512-PrFwOzLEdy27VRXK2uGjmjLq1aROBG7QoQq3eKanmm6Q8vuzT0ZNFCORHh3yJgNQQooXA9tOizGv4vCOmhrvRQ==", - "dev": true, - "dependencies": { - "browserify-cache-api": "^3.0.0", - "JSONStream": "^0.10.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserifyinc": "bin/cmd.js" - }, - "peerDependencies": { - "browserify": "*" - } - }, - "node_modules/browserify-incremental/node_modules/jsonparse": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", - "integrity": "sha512-fw7Q/8gFR8iSekUi9I+HqWIap6mywuoe7hQIg3buTVjuZgALKj4HAmm0X6f+TaL4c9NJbvyFQdaI2ppr5p6dnQ==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/browserify-incremental/node_modules/JSONStream": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.10.0.tgz", - "integrity": "sha512-8XbSFFd43EG+1thjLNFIzCBlwXti0yKa7L+ak/f0T/pkC+31b7G41DXL/JzYpAoYWZ2eCPiu4IIqzijM8N0a/w==", - "dev": true, - "dependencies": { - "jsonparse": "0.0.5", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "index.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "dependencies": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", - "dev": true - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", - "dev": true - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001390", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001390.tgz", - "integrity": "sha512-sS4CaUM+/+vqQUlCvCJ2WtDlV81aWtHhqeEVkLokVJJa3ViN4zDxAGfq9R8i1m90uGHxo99cy10Od+lvn3hf0g==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ] - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "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/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "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", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true - }, - "node_modules/colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha512-UlxQ9Vw0b/Bt/KYwCFqdEwsQ1eL8d1gibiFb7lxQJFdvTgc2hIZi6ugsg+kyhzhPV+QEpUiEIwInIAIrgoEkrg==", - "dev": true, - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", - "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", - "dev": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/connect/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/connect/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/continuable-cache": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", - "integrity": "sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", - "dev": true - }, - "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/coveralls": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", - "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", - "dev": true, - "dependencies": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" - }, - "bin": { - "coveralls": "bin/coveralls.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, - "node_modules/custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true - }, - "node_modules/dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/date-format": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.13.tgz", - "integrity": "sha512-bnYCwf8Emc3pTD8pXnre+wfnjGtfi5ncMDKy7+cWZXbmRAsdWkOQHrfC1yz/KiwP5thDp2kCHWYWKBX4HP1hoQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==", - "dev": true - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/deps-sort": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", - "dev": true, - "dependencies": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" - } - }, - "node_modules/des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detective": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", - "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", - "dev": true - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", - "dev": true, - "dependencies": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true, - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "node_modules/duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.242", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.242.tgz", - "integrity": "sha512-nPdgMWtjjWGCtreW/2adkrB2jyHjClo9PtVhR6rW+oxa4E4Wom642Tn+5LslHP3XPL5MCpkn5/UEY60EXylNeQ==", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/engine.io": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", - "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", - "dev": true, - "dependencies": { - "@types/cookie": "^0.4.1", - "@types/cors": "^2.8.12", - "@types/node": ">=10.0.0", - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.4.1", - "cors": "~2.8.5", - "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", - "dev": true - }, - "node_modules/error": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", - "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", - "dev": true, - "dependencies": { - "string-template": "~0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", - "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.2", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "dev": true, - "dependencies": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=0.12.0" - }, - "optionalDependencies": { - "source-map": "~0.2.0" - } - }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", - "dev": true, - "optional": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", - "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.3.1", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", - "@humanwhocodes/module-importer": "^1.0.1", - "ajv": "^6.10.0", - "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.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "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.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "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.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.10.0" - } + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true }, - "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/boxen": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", "dev": true, "dependencies": { - "estraverse": "^5.1.0" + "ansi-align": "^3.0.1", + "camelcase": "^7.0.0", + "chalk": "^5.0.1", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" }, "engines": { - "node": ">=0.10" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/boxen/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, "engines": { - "node": ">=4.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/boxen/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "engines": { - "node": ">=4.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/boxen/node_modules/chalk": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", + "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "node_modules/boxen/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "node_modules/boxen/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, "engines": { - "node": ">=0.8.x" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "node_modules/boxen/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/execa": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "node_modules/boxen/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^3.0.1", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=12" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "engines": { - "node": ">= 0.8.0" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "homedir-polyfill": "^1.0.1" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, - "engines": [ - "node >=0.6.0" - ] + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true, - "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": ">= 0.8" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, "engines": { - "node": ">= 6" + "node": ">=6" } }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "node_modules/camelcase": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, "dependencies": { - "reusify": "^1.0.4" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" } }, - "node_modules/faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "websocket-driver": ">=0.5.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=0.4.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "node_modules/chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", "dev": true, "dependencies": { - "escape-string-regexp": "^1.0.5" + "chalk": "^4.1.2" }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk-template?sponsor=1" } }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "*" } }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">= 0.8.0" } }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" + "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": ">= 0.8" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "ms": "2.0.0" + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/ci-info": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", "dev": true }, - "node_modules/finalhandler/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, "engines": { - "node": ">= 0.8" + "node": ">=6" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, "engines": { "node": ">=10" }, @@ -3054,2058 +1033,2060 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "dependencies": { - "glob": "~5.0.0" + "restore-cursor": "^3.1.0" }, "engines": { - "node": ">= 0.6.0" + "node": ">=8" } }, - "node_modules/findup-sync/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "string-width": "^4.2.0" }, "engines": { - "node": "*" + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" } }, - "node_modules/fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "node_modules/cli-truncate": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" }, "engines": { - "node": ">= 0.10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "node_modules/cli-truncate/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], + "dependencies": { + "ansi-regex": "^6.0.1" + }, "engines": { - "node": ">=4.0" + "node": ">=12" }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/clipboardy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", + "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", "dev": true, "dependencies": { - "is-callable": "^1.1.3" + "arch": "^2.2.0", + "execa": "^5.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "node_modules/clipboardy/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "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": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "node_modules/clipboardy/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "dependencies": { - "for-in": "^1.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "node_modules/clipboardy/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "engines": { - "node": "*" + "node": ">=10.17.0" } }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=7.0.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "node_modules/colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=0.1.90" } }, - "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 - }, - "node_modules/function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "delayed-stream": "~1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "engines": { + "node": ">= 6" + } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4.0.0" } }, - "node_modules/gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "dependencies": { - "globule": "^1.0.0" + "mime-db": ">= 1.43.0 < 2" }, "engines": { - "node": ">= 4.0.0" + "node": ">= 0.6" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.8.0" } }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" + "dependencies": { + "ms": "2.0.0" } }, - "node_modules/get-func-name": { + "node_modules/compression/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true, "engines": { - "node": "*" + "node": ">= 0.6" } }, - "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 8" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/cypress": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", + "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", "dev": true, - "engines": { - "node": ">=10" + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@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.6.0", + "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": "^5.1.0", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.2", + "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.0", + "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.6", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": ">=12.0.0" } }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "assert-plus": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10" } }, - "node_modules/getobject": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", + "node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true, "engines": { - "node": ">=10" + "node": "*" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "node_modules/dayjs": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, "engines": { - "node": "*" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "dependencies": { - "is-glob": "^4.0.3" + "type-detect": "^4.0.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=0.12" } }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=4.0.0" } }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.0" } }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.3.1" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "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" + "esutils": "^2.0.2" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6.0.0" } }, - "node_modules/globule": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", - "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "dependencies": { - "glob": "~7.1.1", - "lodash": "^4.17.21", - "minimatch": "~3.0.2" - }, - "engines": { - "node": ">= 0.10" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } }, - "node_modules/grunt": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "dependencies": { - "dateformat": "~3.0.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.2", - "findup-sync": "~0.3.0", - "glob": "~7.1.6", - "grunt-cli": "~1.4.3", - "grunt-known-options": "~2.0.0", - "grunt-legacy-log": "~3.0.0", - "grunt-legacy-util": "~2.0.1", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.14.0", - "minimatch": "~3.0.4", - "mkdirp": "~1.0.4", - "nopt": "~3.0.6", - "rimraf": "~3.0.2" - }, - "bin": { - "grunt": "bin/grunt" + "ansi-colors": "^4.1.1" }, "engines": { - "node": ">=8" + "node": ">=8.6" } }, - "node_modules/grunt-browserify": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/grunt-browserify/-/grunt-browserify-6.0.0.tgz", - "integrity": "sha512-m130pTVFEsxQZ+dJQd287TrnUI5VvEKJ+MmPjMF/7bVJBTBRWhJlYVFgBOYLZMUykfk1RWXfQ2sAQu5NuXumvg==", + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "dependencies": { - "async": "^2.5.0", - "browserify": "^17.0.0", - "browserify-incremental": "^3.1.1", - "glob": "^7.1.2", - "lodash": "^4.17.4", - "resolve": "^1.1.6", - "watchify": "^4.0.0" - }, "engines": { - "node": ">= 8.10.x" + "node": ">=6" } }, - "node_modules/grunt-cli": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "dependencies": { - "grunt-known-options": "~2.0.0", - "interpret": "~1.1.0", - "liftup": "~3.0.1", - "nopt": "~4.0.1", - "v8flags": "~3.2.0" - }, - "bin": { - "grunt": "bin/grunt" - }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/grunt-cli/node_modules/nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "node_modules/eslint": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "dependencies": { - "abbrev": "1", - "osenv": "^0.1.4" + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "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.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "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.15.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "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.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" }, "bin": { - "nopt": "bin/nopt.js" + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/grunt-contrib-clean": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", - "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", + "node_modules/eslint-plugin-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", "dev": true, "dependencies": { - "async": "^3.2.3", - "rimraf": "^2.6.2" + "eslint-utils": "^3.0.0", + "rambda": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=14.0.0" }, "peerDependencies": { - "grunt": ">=0.4.5" + "eslint": ">=7.0.0" } }, - "node_modules/grunt-contrib-clean/node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, - "node_modules/grunt-contrib-clean/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/grunt-contrib-concat": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", - "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "dependencies": { - "chalk": "^4.1.2", - "source-map": "^0.5.3" + "eslint-visitor-keys": "^2.0.0" }, "engines": { - "node": ">=0.12.0" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" }, "peerDependencies": { - "grunt": ">=1.4.1" + "eslint": ">=5" } }, - "node_modules/grunt-contrib-uglify": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz", - "integrity": "sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q==", + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "maxmin": "^3.0.0", - "uglify-js": "^3.16.1", - "uri-path": "^1.0.0" - }, "engines": { - "node": ">=12" + "node": ">=10" } }, - "node_modules/grunt-contrib-watch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", - "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==", + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "dependencies": { - "async": "^2.6.0", - "gaze": "^1.1.0", - "lodash": "^4.17.10", - "tiny-lr": "^1.1.1" - }, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/grunt-eslint": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/grunt-eslint/-/grunt-eslint-24.0.0.tgz", - "integrity": "sha512-WpTeBBFweyhMuPjGwRSQV9JFJ+EczIdlsc7Dd/1g78QVI1aZsk4g/H3e+3S5HEwsS1RKL2YZIrGj8hMLlBfN8w==", + "node_modules/espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "dependencies": { - "chalk": "^4.1.2", - "eslint": "^8.0.1" + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=12" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, - "peerDependencies": { - "grunt": ">=1" + "engines": { + "node": ">=4" } }, - "node_modules/grunt-json-merge": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", - "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "dependencies": { - "underscore": "^1.6.0", - "underscore-deep-extend": "0.0.3" + "estraverse": "^5.1.0" }, "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": ">=0.4" + "node": ">=0.10" } }, - "node_modules/grunt-karma": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-4.0.2.tgz", - "integrity": "sha512-4+iBBkXZjHHMDAG5kpHCdDUqlSEBJ6sqouLMRf0p+QB8wGMs300DtaCQphHqd7pM3gpXoGVT3yRRsT7KOZpJMA==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { - "lodash": "^4.17.10" + "estraverse": "^5.2.0" }, - "peerDependencies": { - "grunt": ">=0.4.x", - "karma": "^4.0.0 || ^5.0.0 || ^6.0.0" + "engines": { + "node": ">=4.0" } }, - "node_modules/grunt-known-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=4.0" } }, - "node_modules/grunt-legacy-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.19" - }, "engines": { - "node": ">= 0.10.0" + "node": ">=0.10.0" } }, - "node_modules/grunt-legacy-log-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", + "node_modules/eventemitter2": { + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true + }, + "node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "dependencies": { - "chalk": "~4.1.0", - "lodash": "~4.17.19" + "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/grunt-legacy-util": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "dependencies": { - "async": "~3.2.0", - "exit": "~0.1.2", - "getobject": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.21", - "underscore.string": "~3.3.5", - "which": "~2.0.2" + "pify": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/grunt-legacy-util/node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, - "node_modules/grunt-mocha-istanbul": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/grunt-mocha-istanbul/-/grunt-mocha-istanbul-5.0.2.tgz", - "integrity": "sha512-S5cPYvx04fbDJnIOodKl3REe2gYrtjY1CYuMBvPL4As13pnORG1ibH1mte086iu9uqe56xmrkHlxjixJo26KOA==", + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, - "peerDependencies": { - "grunt": ">=0.4.0" + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, "dependencies": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" + "homedir-polyfill": "^1.0.1" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" }, "bin": { - "handlebars": "bin/handlebars" + "extract-zip": "cli.js" }, "engines": { - "node": ">=0.4.7" + "node": ">= 10.17.0" }, "optionalDependencies": { - "uglify-js": "^3.1.4" + "@types/yauzl": "^2.9.1" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, - "engines": { - "node": ">=0.10.0" + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dev": true, + "dependencies": { + "punycode": "^1.3.2" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "reusify": "^1.0.4" } }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" + "pend": "~1.2.0" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "escape-string-regexp": "^1.0.5" }, "engines": { - "node": ">= 0.4.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.8.0" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, "engines": { - "node": ">=8" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "to-regex-range": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "node_modules/findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "glob": "~5.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6.0" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "node_modules/findup-sync/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=4" + "node": "*" } }, - "node_modules/hash-base/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" }, "engines": { - "node": ">= 6" + "node": ">= 0.10" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "engines": { + "node": ">= 0.10" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, "bin": { - "he": "bin/he" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "flat": "cli.js" } }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { - "parse-passwd": "^1.0.0" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true, - "engines": { - "node": "*" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true, "engines": { - "node": ">=0.10" + "node": ">=0.10.0" } }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", "dev": true, "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "for-in": "^1.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">=0.10.0" } }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, "engines": { - "node": ">= 0.8" + "node": "*" } }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.12" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": ">=10" } }, - "node_modules/https-browserify": { + "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "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, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=12.20.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/husky": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } + "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 }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, "engines": { - "node": ">=0.10.0" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "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" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "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": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true, "engines": { - "node": ">= 4" + "node": "*" } }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "pump": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/getobject": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true, "engines": { - "node": ">=0.8.19" + "node": ">=10" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "async": "^3.2.0" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "assert-plus": "^1.0.0" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } }, - "node_modules/inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha512-0mVWSSbNDvedDWIN4wxLsdPM4a7cIPcpyMxj3QZ406QRwQ6ePGB1YIHxVPjqpcUGbWQ5C+nHTwGNWAGvt7ggVA==", + "node_modules/global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "dependencies": { - "source-map": "~0.5.3" + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/insert-module-globals": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz", - "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "dependencies": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" }, - "bin": { - "insert-module-globals": "bin/cmd.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" + "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.4" + "node": ">=0.10.0" } }, - "node_modules/interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", + "node_modules/global-prefix/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" + "isexe": "^2.0.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "which": "bin/which" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "node_modules/globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "type-fest": "^0.20.2" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-bigint": { + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/grapheme-splitter": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "node_modules/grunt": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", + "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", "dev": true, "dependencies": { - "has-bigints": "^1.0.1" + "dateformat": "~3.0.3", + "eventemitter2": "~0.4.13", + "exit": "~0.1.2", + "findup-sync": "~0.3.0", + "glob": "~7.1.6", + "grunt-cli": "~1.4.3", + "grunt-known-options": "~2.0.0", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", + "nopt": "~3.0.6", + "rimraf": "~3.0.2" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=8" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/grunt-cli": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "grunt-known-options": "~2.0.0", + "interpret": "~1.1.0", + "liftup": "~3.0.1", + "nopt": "~4.0.1", + "v8flags": "~3.2.0" + }, + "bin": { + "grunt": "bin/grunt" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "node_modules/grunt-cli/node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/grunt-contrib-clean": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", + "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "async": "^3.2.3", + "rimraf": "^2.6.2" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "grunt": ">=0.4.5" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "node_modules/grunt-contrib-clean/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "glob": "^7.1.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "rimraf": "bin.js" } }, - "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "node_modules/grunt-contrib-concat": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "chalk": "^4.1.2", + "source-map": "^0.5.3" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "grunt": ">=1.4.1" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "node_modules/grunt-json-merge": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", + "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "underscore": "^1.6.0", + "underscore-deep-extend": "0.0.3" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "grunt": ">=0.4" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/grunt-known-options": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "node_modules/grunt-legacy-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, - "engines": { - "node": ">=12" + "dependencies": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.19" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.10.0" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "node_modules/grunt-legacy-log-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "chalk": "~4.1.0", + "lodash": "~4.17.19" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=10" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/grunt-legacy-util": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", "dev": true, "dependencies": { - "is-extglob": "^2.1.1" + "async": "~3.2.0", + "exit": "~0.1.2", + "getobject": "~1.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.21", + "underscore.string": "~3.3.5", + "which": "~2.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + } + }, + "node_modules/grunt/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" } }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "node_modules/grunt/node_modules/eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", + "dev": true + }, + "node_modules/grunt/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/grunt/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=0.12.0" + "node": "*" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "node_modules/grunt/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "dependencies": { - "has-tostringtag": "^1.0.0" + "function-bind": "^1.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.4.0" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" + "bin": { + "he": "bin/he" } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "parse-passwd": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "node_modules/hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", "dev": true, - "dependencies": { - "is-unc-path": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8.12.0" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "node_modules/husky": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" + "bin": { + "husky": "lib/bin.js" }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/typicode" } }, - "node_modules/is-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", - "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.20.0", - "for-each": "^0.3.3", - "has-tostringtag": "^1.0.0" + "safer-buffer": ">= 2.1.2 < 3" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "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" + } + ] }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "dependencies": { - "unc-path-regex": "^0.1.2" - }, "engines": { - "node": ">=0.10.0" + "node": ">= 4" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.8.19" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/isbinaryfile": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", - "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "engines": { - "node": ">= 8.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/gjtorikian/" + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "node_modules/interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", "dev": true }, - "node_modules/istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg==", - "deprecated": "This module is no longer maintained, try this instead:\n npm i nyc\nVisit https://istanbul.js.org/integrations for other alternatives.", - "dev": true, - "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" }, - "bin": { - "istanbul": "lib/cli.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "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" + "ci-info": "^3.2.0" }, - "engines": { - "node": ">=8" + "bin": { + "is-ci": "bin.js" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "has": "^1.0.3" }, - "engines": { - "node": ">=8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "bin": { + "is-docker": "cli.js" }, "engines": { - "node": ">=10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/istanbul/node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "node_modules/istanbul/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" }, "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul/node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=0.12.0" } }, - "node_modules/istanbul/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=8" } }, - "node_modules/istanbul/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "node_modules/istanbul/node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "dependencies": { - "has-flag": "^1.0.0" - }, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, - "node_modules/istanbul/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "isobject": "^3.0.1" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/js-tokens": { + "node_modules/is-port-reachable": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", + "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/js-yaml/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "dependencies": { + "is-unc-path": "^1.0.0" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, - "bin": { - "json5": "lib/cli.js" + "dependencies": { + "unc-path-regex": "^0.1.2" }, "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node": ">=0.10.0" } }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true, - "engines": [ - "node >= 0.2.0" - ] - }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, "engines": { - "node": ">=0.6.0" + "node": ">=0.10.0" } }, - "node_modules/karma": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.0.tgz", - "integrity": "sha512-s8m7z0IF5g/bS5ONT7wsOavhW4i4aFkzD4u4wgzAQWT4HGUeWI3i21cK2Yz6jndMAeHETp5XuNsRoyGJZXVd4w==", + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "dependencies": { - "@colors/colors": "1.5.0", - "body-parser": "^1.19.0", - "braces": "^3.0.2", - "chokidar": "^3.5.1", - "connect": "^3.7.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.1", - "glob": "^7.1.7", - "graceful-fs": "^4.2.6", - "http-proxy": "^1.18.1", - "isbinaryfile": "^4.0.8", - "lodash": "^4.17.21", - "log4js": "^6.4.1", - "mime": "^2.5.2", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.5", - "qjobs": "^1.2.0", - "range-parser": "^1.2.1", - "rimraf": "^3.0.2", - "socket.io": "^4.4.1", - "source-map": "^0.6.1", - "tmp": "^0.2.1", - "ua-parser-js": "^0.7.30", - "yargs": "^16.1.1" - }, - "bin": { - "karma": "bin/karma" + "is-docker": "^2.0.0" }, "engines": { - "node": ">= 10" + "node": ">=8" } }, - "node_modules/karma-chai": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", - "integrity": "sha512-mqKCkHwzPMhgTYca10S90aCEX9+HjVjjrBFAsw36Zj7BlQNbokXXCAe6Ji04VUMsxcY5RLP7YphpfO06XOubdg==", - "dev": true, - "peerDependencies": { - "chai": "*", - "karma": ">=0.10.9" - } + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, - "node_modules/karma-chrome-launcher": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz", - "integrity": "sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ==", + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, - "dependencies": { - "which": "^1.2.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/karma-chrome-launcher/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true + }, + "node_modules/js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "isexe": "^2.0.0" + "argparse": "^2.0.1" }, "bin": { - "which": "bin/which" + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/karma-coverage": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.0.tgz", - "integrity": "sha512-gPVdoZBNDZ08UCzdMHHhEImKrw1+PAOQOIiffv1YsvxFhBjqvo/SVXNk4tqn1SYqX0BJZT6S/59zgxiBe+9OuA==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.1", - "istanbul-reports": "^3.0.5", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=10.0.0" - } + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true }, - "node_modules/karma-mocha": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz", - "integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.3" - } + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true }, - "node_modules/karma-script-launcher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/karma-script-launcher/-/karma-script-launcher-1.0.0.tgz", - "integrity": "sha512-5NRc8KmTBjNPE3dNfpJP90BArnBohYV4//MsLFfUA1e6N+G1/A5WuWctaFBtMQ6MWRybs/oguSej0JwDr8gInA==", - "dev": true, - "peerDependencies": { - "karma": ">=0.9" - } + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, - "node_modules/karma/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { - "minimist": "^1.2.6" + "universalify": "^2.0.0" }, - "bin": { - "mkdirp": "bin/cmd.js" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/karma/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, - "engines": { - "node": ">=0.10.0" + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" } }, "node_modules/kind-of": { @@ -5117,23 +3098,13 @@ "node": ">=0.10.0" } }, - "node_modules/labeled-stream-splicer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, - "node_modules/lcov-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", + "node_modules/lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true, - "bin": { - "lcov-parse": "bin/cli.js" + "engines": { + "node": "> 0.8" } }, "node_modules/levn": { @@ -5216,16 +3187,213 @@ "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": "^14.13.1 || >=16.0.0" + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/lint-staged/node_modules/execa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "dev": true, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/lint-staged/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/lint-staged/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/listr2": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", + "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "dev": true, + "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.5", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/lint-staged/node_modules/listr2/node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lint-staged/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" }, "funding": { - "url": "https://opencollective.com/lint-staged" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, "dependencies": { "cli-truncate": "^2.1.0", @@ -5233,12 +3401,12 @@ "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", - "rxjs": "^7.5.5", + "rxjs": "^7.5.1", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=12" + "node": ">=10.0.0" }, "peerDependencies": { "enquirer": ">= 2.3.0 < 3" @@ -5265,12 +3433,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/listr2/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/listr2/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -5294,26 +3456,6 @@ "node": ">=8" } }, - "node_modules/listr2/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/livereload-js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", - "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", - "dev": true - }, "node_modules/load-grunt-tasks": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", @@ -5353,26 +3495,17 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha512-eDn9kqrAmVUC1wmZvlQ6Uhde44n+tXpqPrN8olQJbttgh0oKclk+SF54P47VEGE9CEiMeRwAP8BaM7UHvBkz2A==", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", - "dev": true, - "engines": { - "node": ">=0.8.6" - } + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", @@ -5408,12 +3541,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/log-update/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -5440,20 +3567,6 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/log-update/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -5468,22 +3581,6 @@ "node": ">=8" } }, - "node_modules/log4js": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.1.tgz", - "integrity": "sha512-J8VYFH2UQq/xucdNu71io4Fo+purYYudyErgBbswWKO0MC6QVOERRomt5su/z6d3RJSmLyTGmXl3Q/XjKCf+/A==", - "dev": true, - "dependencies": { - "date-format": "^4.0.13", - "debug": "^4.3.4", - "flatted": "^3.2.6", - "rfdc": "^1.3.0", - "streamroller": "^3.1.2" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/loupe": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", @@ -5493,19 +3590,16 @@ "get-func-name": "^2.0.0" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10" } }, "node_modules/make-iterator": { @@ -5529,59 +3623,12 @@ "node": ">=0.10.0" } }, - "node_modules/maxmin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz", - "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "figures": "^3.2.0", - "gzip-size": "^5.1.1", - "pretty-bytes": "^5.3.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -5595,37 +3642,6 @@ "node": ">=8.6" } }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -5648,33 +3664,18 @@ } }, "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, "node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -5684,10 +3685,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/mkdirp": { "version": "1.0.4", @@ -5701,19 +3705,12 @@ "node": ">=10" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, "node_modules/mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -5748,11 +3745,14 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", @@ -5786,18 +3786,6 @@ "node": "*" } }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -5825,50 +3813,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/module-deps": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", - "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", - "dev": true, - "dependencies": { - "browser-resolve": "^2.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "module-deps": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5916,84 +3860,39 @@ "dev": true, "engines": { "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true - }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, - "engines": { - "node": ">=12" + "dependencies": { + "abbrev": "1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "nopt": "bin/nopt.js" } }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/object-inspect": { @@ -6005,33 +3904,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.defaults": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", @@ -6072,14 +3944,11 @@ "node": ">=0.10.0" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, "engines": { "node": ">= 0.8" } @@ -6094,15 +3963,15 @@ } }, "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "dependencies": { - "mimic-fn": "^4.0.0" + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=12" + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6125,12 +3994,6 @@ "node": ">= 0.8.0" } }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", - "dev": true - }, "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -6159,14 +4022,11 @@ "os-tmpdir": "^1.0.0" } }, - "node_modules/outpipe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", - "integrity": "sha512-BnNY/RwnDrkmQdUa9U+OfN/Y7AWmKuUPCCd+hbRclZnnANvYpO72zp/a6Q4n829hPbdqEac31XCcsvlEvb+rtA==", - "dev": true, - "dependencies": { - "shell-quote": "^1.4.2" - } + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true }, "node_modules/p-limit": { "version": "3.1.0", @@ -6222,12 +4082,6 @@ "node": ">=6" } }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6240,28 +4094,6 @@ "node": ">=6" } }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", - "dev": true, - "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, "node_modules/parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -6285,21 +4117,6 @@ "node": ">=0.10.0" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6318,6 +4135,12 @@ "node": ">=0.10.0" } }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -6333,15 +4156,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/path-root": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", @@ -6363,14 +4177,11 @@ "node": ">=0.10.0" } }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true }, "node_modules/pathval": { "version": "1.1.1", @@ -6381,21 +4192,11 @@ "node": "*" } }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true }, "node_modules/performance-now": { "version": "2.1.0", @@ -6403,12 +4204,6 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -6434,12 +4229,12 @@ } }, "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, "node_modules/pkg-up": { @@ -6551,19 +4346,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "dev": true }, "node_modules/psl": { @@ -6572,73 +4358,29 @@ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, "node_modules/punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, - "node_modules/qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true, - "engines": { - "node": ">=0.9" - } - }, "node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, "engines": { "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", - "dev": true, - "engines": { - "node": ">=0.4.x" } }, "node_modules/queue-microtask": { @@ -6661,6 +4403,12 @@ } ] }, + "node_modules/rambda": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", + "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", + "dev": true + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -6670,77 +4418,43 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true, "engines": { "node": ">= 0.6" } }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha512-3ALe0bjBVZtkdWKIcThYpQCLbBMd/+Tbh2CDSrAIDO3UsZ4Xs+tnyjv2MjCOMMgBG+AsUOeuP1cgtY1INISc8w==", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "bin": { + "rc": "cli.js" } }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "node_modules/readable-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" + "engines": { + "node": ">=0.10.0" } }, "node_modules/readdirp": { @@ -6767,23 +4481,6 @@ "node": ">= 0.10" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -6796,45 +4493,35 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "node_modules/registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "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", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "dev": true, + "dependencies": { + "rc": "^1.0.1" }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "node_modules/request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", "dev": true, - "engines": { - "node": ">=0.6" + "dependencies": { + "throttleit": "^1.0.0" } }, "node_modules/require-directory": { @@ -6846,11 +4533,14 @@ "node": ">=0.10.0" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, "node_modules/resolve": { "version": "1.22.1", @@ -6904,49 +4594,25 @@ } }, "node_modules/resolve-pkg/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/restore-cursor/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/reusify": { @@ -6980,14 +4646,20 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "node_modules/rollup": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.3.tgz", + "integrity": "sha512-qfadtkY5kl0F5e4dXVdj2D+GtOdifasXHFMiL1SMf9ADQDv5Eti6xReef9FKj+iQPR2pvtqWna57s/PjARY4fg==", "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, "node_modules/run-parallel": { @@ -7014,9 +4686,9 @@ } }, "node_modules/rxjs": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", - "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -7042,12 +4714,6 @@ } ] }, - "node_modules/safe-json-parse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", - "integrity": "sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A==", - "dev": true - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7055,12 +4721,18 @@ "dev": true }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/serialize-javascript": { @@ -7072,34 +4744,114 @@ "randombytes": "^2.1.0" } }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "node_modules/serve": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", + "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "@zeit/schemas": "2.21.0", + "ajv": "8.11.0", + "arg": "5.0.2", + "boxen": "7.0.0", + "chalk": "5.0.1", + "chalk-template": "0.4.0", + "clipboardy": "3.0.0", + "compression": "1.7.4", + "is-port-reachable": "4.0.0", + "serve-handler": "6.1.3", + "update-check": "1.5.4" }, "bin": { - "sha.js": "bin.js" + "serve": "build/main.js" + }, + "engines": { + "node": ">= 14" } }, - "node_modules/shasum-object": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "node_modules/serve-handler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "dev": true, + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.0.4", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/serve/node_modules/ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, "dependencies": { - "fast-safe-stringify": "^2.0.7" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/serve/node_modules/chalk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/serve/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7121,61 +4873,12 @@ "node": ">=8" } }, - "node_modules/shell-quote": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", - "dev": true - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "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" - } - ] - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", @@ -7193,9 +4896,9 @@ } }, "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "engines": { "node": ">=12" @@ -7204,55 +4907,38 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" - }, "engines": { - "node": ">=10.0.0" + "node": ">=0.10.0" } }, - "node_modules/socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", - "dev": true - }, - "node_modules/socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, "node_modules/sshpk": { @@ -7280,193 +4966,36 @@ "node": ">=0.10.0" } }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/stream-browserify/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==", - "dev": true, - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-http": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", - "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", - "dev": true, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/stream-http/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/streamroller": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.2.tgz", - "integrity": "sha512-wZswqzbgGGsXYIrBYhOE0yP+nQ6XRk7xDcYwuQAGTYXdyAUmvgVFE0YU1g5pvQT0m7GBaQfYcSnlHbapuK0H0A==", - "dev": true, - "dependencies": { - "date-format": "^4.0.13", - "debug": "^4.3.4", - "fs-extra": "^8.1.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw==", - "dev": true - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "engines": { + "node": ">=0.6.19" } }, - "node_modules/string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "node_modules/string-width/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/strip-ansi": { @@ -7482,15 +5011,12 @@ } }, "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/strip-json-comments": { @@ -7505,25 +5031,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", - "dev": true, - "dependencies": { - "minimist": "^1.1.0" - } - }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -7538,72 +5058,48 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "node_modules/terser": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, "dependencies": { - "acorn-node": "^1.2.0" + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "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", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", + "dev": true + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha512-PIxwAupJZiYU4JmVZYwXp9FKsHMXb5h0ZEFyuXTAn8WLHOlcij+FEcbrvDsom1o5dr1YggEtFbECvGCW2sT53Q==", - "dev": true, - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/tiny-lr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", - "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", - "dev": true, - "dependencies": { - "body": "^5.1.0", - "debug": "^3.1.0", - "faye-websocket": "~0.10.0", - "livereload-js": "^2.3.0", - "object-assign": "^4.1.0", - "qs": "^6.4.0" - } - }, - "node_modules/tiny-lr/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -7616,15 +5112,6 @@ "node": ">=8.17.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7637,15 +5124,6 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -7674,12 +5152,6 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -7731,80 +5203,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "node_modules/ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - } - ], - "engines": { - "node": "*" - } - }, - "node_modules/uglify-js": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", - "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==", - "dev": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true, - "bin": { - "umd": "bin/cli.js" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", @@ -7814,26 +5212,10 @@ "node": ">=0.10.0" } }, - "node_modules/undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - }, - "bin": { - "undeclared-identifiers": "bin.js" - } - }, "node_modules/underscore": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", - "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==", + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, "node_modules/underscore-deep-extend": { @@ -7855,54 +5237,32 @@ "node": "*" } }, - "node_modules/underscore.string/node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true, "engines": { - "node": ">= 0.8" + "node": ">=8" } }, - "node_modules/update-browserslist-db": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz", - "integrity": "sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==", + "node_modules/update-check": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", + "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" } }, "node_modules/uri-js": { @@ -7923,68 +5283,19 @@ "node": ">=6" } }, - "node_modules/uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true - }, - "node_modules/util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, "node_modules/v8flags": { @@ -8022,143 +5333,84 @@ "extsprintf": "^1.2.0" } }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "node_modules/void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/watchify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/watchify/-/watchify-4.0.0.tgz", - "integrity": "sha512-2Z04dxwoOeNxa11qzWumBTgSAohTC0+ScuY7XMenPnH+W2lhTcpEOJP4g2EIG/SWeLadPk47x++Yh+8BqPM/lA==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "anymatch": "^3.1.0", - "browserify": "^17.0.0", - "chokidar": "^3.4.0", - "defined": "^1.0.0", - "outpipe": "^1.1.0", - "through2": "^4.0.2", - "xtend": "^4.0.2" + "isexe": "^2.0.0" }, "bin": { - "watchify": "bin/cmd.js" + "node-which": "bin/node-which" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 8" } }, - "node_modules/watchify/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "string-width": "^5.0.1" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/watchify/node_modules/through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", - "dev": true, - "dependencies": { - "readable-stream": "3" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" + "node": ">=12" }, - "engines": { - "node": ">=0.8.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "node_modules/widest-line/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "node": ">=12" }, - "engines": { - "node": ">= 8" + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "node_modules/widest-line/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/widest-line/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/which-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", - "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", + "node_modules/widest-line/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.20.0", - "for-each": "^0.3.3", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.9" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/word-wrap": { @@ -8170,12 +5422,6 @@ "node": ">=0.10.0" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -8199,71 +5445,12 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", - "dev": true, - "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/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -8273,10 +5460,16 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true, "engines": { "node": ">= 14" @@ -8324,33 +5517,26 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } }, "node_modules/yocto-queue": { @@ -8367,337 +5553,64 @@ } }, "dependencies": { - "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "requires": { - "@babel/highlight": "^7.18.6" - } - }, - "@babel/compat-data": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.0.tgz", - "integrity": "sha512-y5rqgTTPTmaF5e2nVhOxw+Ur9HDJLsWb6U/KpgUzRZEdPfE6VOubXBKLdbcUTijzRptednSBDQbYZBOSqJxpJw==", - "dev": true - }, - "@babel/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.0.tgz", - "integrity": "sha512-reM4+U7B9ss148rh2n1Qs9ASS+w94irYXga7c2jaQv9RVzpS7Mv1a9rnYYwuDa45G+DkORt9g6An2k/V4d9LbQ==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-compilation-targets": "^7.19.0", - "@babel/helper-module-transforms": "^7.19.0", - "@babel/helpers": "^7.19.0", - "@babel/parser": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "dependencies": { - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.0.tgz", - "integrity": "sha512-S1ahxf1gZ2dpoiFgA+ohK9DIpz50bJ0CWs7Zlzb54Z4sG8qmdIrGrVqmy1sAtTVRb+9CU6U8VqT9L0Zj7hxHVg==", - "dev": true, - "requires": { - "@babel/types": "^7.19.0", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } - } - }, - "@babel/helper-compilation-targets": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.0.tgz", - "integrity": "sha512-Ai5bNWXIvwDvWM7njqsG3feMlL9hCVQsPYXodsZyLwshYkZVJt59Gftau4VrE8S9IT9asd2uSP1hG6wCNw+sXA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.19.0", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" - } - }, - "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", - "dev": true, - "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-transforms": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz", - "integrity": "sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" - } - }, - "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true + "optional": true }, - "@babel/helpers": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.0.tgz", - "integrity": "sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==", + "@cypress/request": { + "version": "2.88.10", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", + "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "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.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" } }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "debug": "^3.1.0", + "lodash.once": "^4.1.1" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.0.tgz", - "integrity": "sha512-74bEXKX2h+8rrfQUfsBfuZZHzsEs6Eql4pqy/T4Nn6Y9wNPggQOqD6z6pn5Bl8ZfysKouFZT/UXEH94ummEeQw==", - "dev": true - }, - "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" - } - }, - "@babel/traverse": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.0.tgz", - "integrity": "sha512-4pKpFRDh+utd2mbRC8JLnlsMUii3PMHjpL6a0SZ4NMZy7YFP9aXORxEhdMVOc9CpWtDF09IkciQLEhK7Ml7gRA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.0", - "@babel/types": "^7.19.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" - } - }, - "@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true + "requires": { + "ms": "^2.1.1" + } + } + } }, "@eslint/eslintrc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", - "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -8709,51 +5622,19 @@ "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } } }, "@humanwhocodes/config-array": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", - "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", - "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -8766,20 +5647,15 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" } }, "@jridgewell/resolve-uri": { @@ -8794,6 +5670,16 @@ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", @@ -8801,13 +5687,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, "@nodelib/fs.scandir": { @@ -8836,23 +5722,14 @@ "fastq": "^1.6.0" } }, - "@socket.io/component-emitter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", - "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", - "dev": true - }, - "@types/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", - "dev": true - }, - "@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true + "@rollup/plugin-terser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", + "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", + "dev": true, + "requires": { + "terser": "^5.15.1" + } }, "@types/minimatch": { "version": "3.0.5", @@ -8861,21 +5738,43 @@ "dev": true }, "@types/node": { - "version": "18.7.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.15.tgz", - "integrity": "sha512-XnjpaI8Bgc3eBag2Aw4t2Uj/49lLBSStHWfqKvIuXD7FIrZyMLWp8KuAFHAqxMZYTF9l08N1ctUn9YNybZJVmQ==", + "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", + "@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, + "@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@zeit/schemas": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", + "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", "dev": true }, "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, "accepts": { @@ -8889,9 +5788,9 @@ } }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-jsx": { @@ -8901,31 +5800,6 @@ "dev": true, "requires": {} }, - "acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - }, - "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - } - } - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true - }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -8948,17 +5822,19 @@ "uri-js": "^4.2.2" } }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, - "optional": true + "requires": { + "string-width": "^4.1.0" + } }, "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-escapes": { @@ -9003,14 +5879,23 @@ "picomatch": "^2.0.4" } }, + "arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true + }, + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "array-differ": { "version": "3.0.0", @@ -9051,53 +5936,6 @@ "safer-buffer": "~2.1.0" } }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -9117,13 +5955,10 @@ "dev": true }, "async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true }, "asynckit": { "version": "0.4.0", @@ -9131,10 +5966,10 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true }, "aws-sign2": { @@ -9161,12 +5996,6 @@ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, - "base64id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", - "dev": true - }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -9182,384 +6011,156 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", "dev": true }, - "body": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", - "integrity": "sha512-chUsBxGRtuElD6fmw1gHLpvnKdVLK302peeFa9ZqAEk8TyzZ3fygLyUEDDPTJvL9+Bor0dIwn6ePOsRM2y0zQQ==", + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "boxen": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", "dev": true, "requires": { - "continuable-cache": "^0.3.1", - "error": "^7.0.0", - "raw-body": "~1.1.0", - "safe-json-parse": "~1.0.1" + "ansi-align": "^3.0.1", + "camelcase": "^7.0.0", + "chalk": "^5.0.1", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" }, "dependencies": { - "bytes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", - "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==", + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "chalk": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", + "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, - "raw-body": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz", - "integrity": "sha512-WmJJU2e9Y6M5UzTOkHaM7xJGAPQD8PNzx3bAd2+uhZAim6wDk6dAZxPVYLF67XhbR4hmKGh33Lpmh4XWrCH5Mg==", + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { - "bytes": "1", - "string_decoder": "0.10" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true - } - } - }, - "body-parser": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", - "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "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.10.3", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { - "ms": "2.0.0" + "ansi-regex": "^6.0.1" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "requires": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - } - }, - "browser-resolve": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", - "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", - "dev": true, - "requires": { - "resolve": "^1.17.0" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.0.tgz", - "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", - "dev": true, - "requires": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^2.0.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.1", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^3.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.2.1", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.2.3", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "^1.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum-object": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^3.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.12.0", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cache-api": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/browserify-cache-api/-/browserify-cache-api-3.0.2.tgz", - "integrity": "sha512-14YNbboSgSHY5QNZSLwlGYB7OuBuXS7gMyR2gfBjdS4JYcWB9BqyKhraQG/VW2W5ZhjkC/C8LZ38sP3bmbmeNA==", - "dev": true, - "requires": { - "async": "^2.6.4", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-incremental": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/browserify-incremental/-/browserify-incremental-3.1.1.tgz", - "integrity": "sha512-PrFwOzLEdy27VRXK2uGjmjLq1aROBG7QoQq3eKanmm6Q8vuzT0ZNFCORHh3yJgNQQooXA9tOizGv4vCOmhrvRQ==", - "dev": true, - "requires": { - "browserify-cache-api": "^3.0.0", - "JSONStream": "^0.10.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "jsonparse": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", - "integrity": "sha512-fw7Q/8gFR8iSekUi9I+HqWIap6mywuoe7hQIg3buTVjuZgALKj4HAmm0X6f+TaL4c9NJbvyFQdaI2ppr5p6dnQ==", + "type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true }, - "JSONStream": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.10.0.tgz", - "integrity": "sha512-8XbSFFd43EG+1thjLNFIzCBlwXti0yKa7L+ak/f0T/pkC+31b7G41DXL/JzYpAoYWZ2eCPiu4IIqzijM8N0a/w==", + "wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", "dev": true, "requires": { - "jsonparse": "0.0.5", - "through": ">=2.2.7 <3" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" } } } }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "pako": "~1.0.5" + "fill-range": "^7.0.1" } }, - "browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" - } + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", - "dev": true - }, "bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true }, - "cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", + "cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -9567,15 +6168,9 @@ "dev": true }, "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001390", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001390.tgz", - "integrity": "sha512-sS4CaUM+/+vqQUlCvCJ2WtDlV81aWtHhqeEVkLokVJJa3ViN4zDxAGfq9R8i1m90uGHxo99cy10Od+lvn3hf0g==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", "dev": true }, "caseless": { @@ -9607,6 +6202,26 @@ "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "dev": true, + "requires": { + "chalk": "^4.1.2" } }, "check-error": { @@ -9615,6 +6230,12 @@ "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true }, + "check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -9642,15 +6263,11 @@ } } }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } + "ci-info": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "dev": true }, "clean-stack": { "version": "2.2.0", @@ -9658,6 +6275,12 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "dev": true + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -9667,6 +6290,16 @@ "restore-cursor": "^3.1.0" } }, + "cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + }, "cli-truncate": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", @@ -9675,44 +6308,95 @@ "requires": { "slice-ansi": "^5.0.0", "string-width": "^5.0.0" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" }, "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "clipboardy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", + "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", + "dev": true, + "requires": { + "arch": "^2.2.0", + "execa": "^5.1.1", + "is-wsl": "^2.2.0" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "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" } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true } } }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -9740,18 +6424,6 @@ "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", "dev": true }, - "combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha512-UlxQ9Vw0b/Bt/KYwCFqdEwsQ1eL8d1gibiFb7lxQJFdvTgc2hIZi6ugsg+kyhzhPV+QEpUiEIwInIAIrgoEkrg==", - "dev": true, - "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -9762,39 +6434,39 @@ } }, "commander": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", - "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "mime-db": ">= 1.43.0 < 2" } }, - "connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" }, "dependencies": { "debug": { @@ -9811,119 +6483,33 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true } } }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "continuable-cache": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", - "integrity": "sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA==", - "dev": true - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true }, "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "coveralls": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.1.tgz", - "integrity": "sha512-+dxnG2NHncSD1NrqbSM3dn/lE57O6Qf/koe9+I7c+wzkqRmEvcp0kgJdxKInzYzkICKkFMZsX3Vct3++tsF9ww==", - "dev": true, - "requires": { - "js-yaml": "^3.13.1", - "lcov-parse": "^1.0.0", - "log-driver": "^1.2.7", - "minimist": "^1.2.5", - "request": "^2.88.2" - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -9935,37 +6521,56 @@ "which": "^2.0.1" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "cypress": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", + "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", "dev": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@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.6.0", + "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": "^5.1.0", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.2", + "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.0", + "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.6", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" } }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", - "dev": true - }, - "dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -9975,18 +6580,18 @@ "assert-plus": "^1.0.0" } }, - "date-format": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.13.tgz", - "integrity": "sha512-bnYCwf8Emc3pTD8pXnre+wfnjGtfi5ncMDKy7+cWZXbmRAsdWkOQHrfC1yz/KiwP5thDp2kCHWYWKBX4HP1hoQ==", - "dev": true - }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true }, + "dayjs": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", + "dev": true + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -10011,66 +6616,22 @@ "type-detect": "^4.0.0" } }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==", - "dev": true - }, "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "deps-sort": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - } - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, "detect-file": { @@ -10079,57 +6640,12 @@ "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true }, - "detective": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", - "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", - "dev": true, - "requires": { - "acorn-node": "^1.8.2", - "defined": "^1.0.0", - "minimist": "^1.2.6" - } - }, - "di": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", - "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", - "dev": true - }, "diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -10139,39 +6655,6 @@ "esutils": "^2.0.2" } }, - "dom-serialize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", - "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", - "dev": true, - "requires": { - "custom-event": "~1.0.0", - "ent": "~2.2.0", - "extend": "^3.0.0", - "void-elements": "^2.0.0" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -10188,132 +6671,28 @@ "safer-buffer": "^2.1.0" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.4.242", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.242.tgz", - "integrity": "sha512-nPdgMWtjjWGCtreW/2adkrB2jyHjClo9PtVhR6rW+oxa4E4Wom642Tn+5LslHP3XPL5MCpkn5/UEY60EXylNeQ==", - "dev": true - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true - }, - "engine.io": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.0.tgz", - "integrity": "sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg==", - "dev": true, - "requires": { - "@types/cookie": "^0.4.1", - "@types/cors": "^2.8.12", - "@types/node": ">=10.0.0", - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "~0.4.1", - "cors": "~2.8.5", - "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" - } - }, - "engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", - "dev": true - }, - "ent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", - "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "error": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz", - "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==", + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { - "string-template": "~0.2.1" + "once": "^1.4.0" } }, - "es-abstract": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.2.tgz", - "integrity": "sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==", + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.2", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.2", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "ansi-colors": "^4.1.1" } }, "escalade": { @@ -10322,98 +6701,22 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, "eslint": { - "version": "8.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", - "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.1", - "@humanwhocodes/config-array": "^0.10.4", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -10429,15 +6732,15 @@ "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^6.0.1", + "glob-parent": "^6.0.2", "globals": "^13.15.0", - "globby": "^11.1.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -10449,32 +6752,16 @@ "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + } + }, + "eslint-plugin-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", + "dev": true, + "requires": { + "eslint-utils": "^3.0.0", + "rambda": "^7.1.0" } }, "eslint-scope": { @@ -10522,9 +6809,9 @@ } }, "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { @@ -10558,48 +6845,35 @@ "dev": true }, "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" + "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" } }, - "execa": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^3.0.1", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" + "pify": "^2.2.0" } }, "exit": { @@ -10623,6 +6897,18 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -10635,30 +6921,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", - "dev": true, - "requires": { - "@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" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -10671,11 +6933,14 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "dev": true + "fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dev": true, + "requires": { + "punycode": "^1.3.2" + } }, "fastq": { "version": "1.13.0", @@ -10686,13 +6951,13 @@ "reusify": "^1.0.4" } }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ==", + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "requires": { - "websocket-driver": ">=0.5.1" + "pend": "~1.2.0" } }, "figures": { @@ -10730,47 +6995,6 @@ "to-regex-range": "^5.0.1" } }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - } - } - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -10846,21 +7070,6 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, - "follow-redirects": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", - "dev": true - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -10894,14 +7103,15 @@ } }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } }, "fs.realpath": { @@ -10923,51 +7133,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", - "dev": true, - "requires": { - "globule": "^1.0.0" - } - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -10980,31 +7145,13 @@ "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "pump": "^3.0.0" } }, "getobject": { @@ -11013,6 +7160,15 @@ "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true }, + "getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "requires": { + "async": "^3.2.0" + } + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -11045,6 +7201,15 @@ "is-glob": "^4.0.3" } }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, "global-modules": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", @@ -11069,6 +7234,12 @@ "which": "^1.2.14" }, "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -11089,31 +7260,6 @@ "type-fest": "^0.20.2" } }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "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" - } - }, - "globule": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.4.tgz", - "integrity": "sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg==", - "dev": true, - "requires": { - "glob": "~7.1.1", - "lodash": "^4.17.21", - "minimatch": "~3.0.2" - } - }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -11147,21 +7293,48 @@ "mkdirp": "~1.0.4", "nopt": "~3.0.6", "rimraf": "~3.0.2" - } - }, - "grunt-browserify": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/grunt-browserify/-/grunt-browserify-6.0.0.tgz", - "integrity": "sha512-m130pTVFEsxQZ+dJQd287TrnUI5VvEKJ+MmPjMF/7bVJBTBRWhJlYVFgBOYLZMUykfk1RWXfQ2sAQu5NuXumvg==", - "dev": true, - "requires": { - "async": "^2.5.0", - "browserify": "^17.0.0", - "browserify-incremental": "^3.1.1", - "glob": "^7.1.2", - "lodash": "^4.17.4", - "resolve": "^1.1.6", - "watchify": "^4.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + } } }, "grunt-cli": { @@ -11199,12 +7372,6 @@ "rimraf": "^2.6.2" }, "dependencies": { - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -11226,40 +7393,6 @@ "source-map": "^0.5.3" } }, - "grunt-contrib-uglify": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz", - "integrity": "sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q==", - "dev": true, - "requires": { - "chalk": "^4.1.2", - "maxmin": "^3.0.0", - "uglify-js": "^3.16.1", - "uri-path": "^1.0.0" - } - }, - "grunt-contrib-watch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", - "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==", - "dev": true, - "requires": { - "async": "^2.6.0", - "gaze": "^1.1.0", - "lodash": "^4.17.10", - "tiny-lr": "^1.1.1" - } - }, - "grunt-eslint": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/grunt-eslint/-/grunt-eslint-24.0.0.tgz", - "integrity": "sha512-WpTeBBFweyhMuPjGwRSQV9JFJ+EczIdlsc7Dd/1g78QVI1aZsk4g/H3e+3S5HEwsS1RKL2YZIrGj8hMLlBfN8w==", - "dev": true, - "requires": { - "chalk": "^4.1.2", - "eslint": "^8.0.1" - } - }, "grunt-json-merge": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", @@ -11270,15 +7403,6 @@ "underscore-deep-extend": "0.0.3" } }, - "grunt-karma": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-4.0.2.tgz", - "integrity": "sha512-4+iBBkXZjHHMDAG5kpHCdDUqlSEBJ6sqouLMRf0p+QB8wGMs300DtaCQphHqd7pM3gpXoGVT3yRRsT7KOZpJMA==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, "grunt-known-options": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", @@ -11320,68 +7444,6 @@ "lodash": "~4.17.21", "underscore.string": "~3.3.5", "which": "~2.0.2" - }, - "dependencies": { - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - } - } - }, - "grunt-mocha-istanbul": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/grunt-mocha-istanbul/-/grunt-mocha-istanbul-5.0.2.tgz", - "integrity": "sha512-S5cPYvx04fbDJnIOodKl3REe2gYrtjY1CYuMBvPL4As13pnORG1ibH1mte086iu9uqe56xmrkHlxjixJo26KOA==", - "dev": true, - "requires": {} - }, - "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^4.0.1" - } - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" } }, "has": { @@ -11393,93 +7455,18 @@ "function-bind": "^1.1.1" } }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -11495,77 +7482,21 @@ "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", "dev": true }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", - "dev": true - }, - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "dependencies": { - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } - } - }, - "http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "requires": { "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" } }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", - "dev": true - }, "human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, "husky": { @@ -11634,49 +7565,11 @@ "dev": true }, "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha512-0mVWSSbNDvedDWIN4wxLsdPM4a7cIPcpyMxj3QZ406QRwQ6ePGB1YIHxVPjqpcUGbWQ5C+nHTwGNWAGvt7ggVA==", - "dev": true, - "requires": { - "source-map": "~0.5.3" - } - }, - "insert-module-globals": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz", - "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", - "dev": true, - "requires": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - } - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", @@ -11693,25 +7586,6 @@ "is-windows": "^1.0.1" } }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -11721,45 +7595,29 @@ "binary-extensions": "^2.0.0" } }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "ci-info": "^3.2.0" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "requires": { "has": "^1.0.3" } }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true }, "is-extglob": { "version": "2.1.1", @@ -11773,15 +7631,6 @@ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true }, - "is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -11791,11 +7640,15 @@ "is-extglob": "^2.1.1" } }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } }, "is-number": { "version": "7.0.0", @@ -11803,14 +7656,11 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true }, "is-plain-obj": { "version": "2.1.0", @@ -11827,15 +7677,11 @@ "isobject": "^3.0.1" } }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } + "is-port-reachable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", + "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", + "dev": true }, "is-relative": { "version": "1.0.0", @@ -11846,52 +7692,12 @@ "is-unc-path": "^1.0.0" } }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, "is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz", - "integrity": "sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.20.0", - "for-each": "^0.3.3", - "has-tostringtag": "^1.0.0" - } - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -11913,32 +7719,20 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "isbinaryfile": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", - "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", - "dev": true + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } }, "isexe": { "version": "2.0.0", @@ -11958,169 +7752,19 @@ "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg==", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", - "dev": true - }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.0.tgz", - "integrity": "sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==", - "dev": true, - "requires": { - "@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" - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", "dev": true }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } + "argparse": "^2.0.1" } }, "jsbn": { @@ -12129,12 +7773,6 @@ "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -12159,41 +7797,20 @@ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, - "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true - }, "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" } }, "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "requires": { "assert-plus": "1.0.0", @@ -12202,132 +7819,16 @@ "verror": "1.10.0" } }, - "karma": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.0.tgz", - "integrity": "sha512-s8m7z0IF5g/bS5ONT7wsOavhW4i4aFkzD4u4wgzAQWT4HGUeWI3i21cK2Yz6jndMAeHETp5XuNsRoyGJZXVd4w==", - "dev": true, - "requires": { - "@colors/colors": "1.5.0", - "body-parser": "^1.19.0", - "braces": "^3.0.2", - "chokidar": "^3.5.1", - "connect": "^3.7.0", - "di": "^0.0.1", - "dom-serialize": "^2.2.1", - "glob": "^7.1.7", - "graceful-fs": "^4.2.6", - "http-proxy": "^1.18.1", - "isbinaryfile": "^4.0.8", - "lodash": "^4.17.21", - "log4js": "^6.4.1", - "mime": "^2.5.2", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.5", - "qjobs": "^1.2.0", - "range-parser": "^1.2.1", - "rimraf": "^3.0.2", - "socket.io": "^4.4.1", - "source-map": "^0.6.1", - "tmp": "^0.2.1", - "ua-parser-js": "^0.7.30", - "yargs": "^16.1.1" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "karma-chai": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz", - "integrity": "sha512-mqKCkHwzPMhgTYca10S90aCEX9+HjVjjrBFAsw36Zj7BlQNbokXXCAe6Ji04VUMsxcY5RLP7YphpfO06XOubdg==", - "dev": true, - "requires": {} - }, - "karma-chrome-launcher": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz", - "integrity": "sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ==", - "dev": true, - "requires": { - "which": "^1.2.1" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "karma-coverage": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.0.tgz", - "integrity": "sha512-gPVdoZBNDZ08UCzdMHHhEImKrw1+PAOQOIiffv1YsvxFhBjqvo/SVXNk4tqn1SYqX0BJZT6S/59zgxiBe+9OuA==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.1", - "istanbul-reports": "^3.0.5", - "minimatch": "^3.0.4" - } - }, - "karma-mocha": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz", - "integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==", - "dev": true, - "requires": { - "minimist": "^1.2.3" - } - }, - "karma-script-launcher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/karma-script-launcher/-/karma-script-launcher-1.0.0.tgz", - "integrity": "sha512-5NRc8KmTBjNPE3dNfpJP90BArnBohYV4//MsLFfUA1e6N+G1/A5WuWctaFBtMQ6MWRybs/oguSej0JwDr8gInA==", - "dev": true, - "requires": {} - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, - "labeled-stream-splicer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, - "lcov-parse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", - "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", + "lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true }, "levn": { @@ -12362,45 +7863,169 @@ "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^4.0.2", + "resolve-dir": "^1.0.1" + } + } + } + }, + "lilconfig": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "dev": true + }, + "lint-staged": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", + "dev": true, + "requires": { + "cli-truncate": "^3.1.0", + "colorette": "^2.0.17", + "commander": "^9.3.0", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.5", + "listr2": "^4.0.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.1", + "yaml": "^2.1.1" + }, + "dependencies": { + "commander": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "dev": true + }, + "execa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "listr2": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", + "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "dev": true, + "requires": { + "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.5", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + } + } + } + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" } + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true } } }, - "lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", - "dev": true - }, - "lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", - "dev": true, - "requires": { - "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", - "debug": "^4.3.4", - "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-inspect": "^1.12.2", - "pidtree": "^0.6.0", - "string-argv": "^0.3.1", - "yaml": "^2.1.1" - } - }, "listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, "requires": { "cli-truncate": "^2.1.0", @@ -12408,7 +8033,7 @@ "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", - "rxjs": "^7.5.5", + "rxjs": "^7.5.1", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, @@ -12423,12 +8048,6 @@ "string-width": "^4.2.0" } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -12445,26 +8064,9 @@ "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" } - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } } } }, - "livereload-js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", - "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw==", - "dev": true - }, "load-grunt-tasks": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", @@ -12492,22 +8094,16 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha512-eDn9kqrAmVUC1wmZvlQ6Uhde44n+tXpqPrN8olQJbttgh0oKclk+SF54P47VEGE9CEiMeRwAP8BaM7UHvBkz2A==", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "log-driver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", - "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true }, "log-symbols": { @@ -12532,12 +8128,6 @@ "wrap-ansi": "^6.2.0" }, "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -12555,17 +8145,6 @@ "is-fullwidth-code-point": "^3.0.0" } }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -12579,19 +8158,6 @@ } } }, - "log4js": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.6.1.tgz", - "integrity": "sha512-J8VYFH2UQq/xucdNu71io4Fo+purYYudyErgBbswWKO0MC6QVOERRomt5su/z6d3RJSmLyTGmXl3Q/XjKCf+/A==", - "dev": true, - "requires": { - "date-format": "^4.0.13", - "debug": "^4.3.4", - "flatted": "^3.2.6", - "rfdc": "^1.3.0", - "streamroller": "^3.1.2" - } - }, "loupe": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", @@ -12601,13 +8167,13 @@ "get-func-name": "^2.0.0" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { - "semver": "^6.0.0" + "yallist": "^4.0.0" } }, "make-iterator": { @@ -12625,47 +8191,12 @@ "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true }, - "maxmin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz", - "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "figures": "^3.2.0", - "gzip-size": "^5.1.1", - "pretty-bytes": "^5.3.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true - }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -12676,30 +8207,6 @@ "picomatch": "^2.3.1" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true - }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -12716,36 +8223,24 @@ } }, "mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true }, "mkdirp": { @@ -12754,19 +8249,12 @@ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, "mocha": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", - "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -12790,10 +8278,10 @@ "yargs-unparser": "2.0.0" }, "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "glob": { @@ -12821,15 +8309,6 @@ } } }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, "minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -12855,41 +8334,9 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, - "module-deps": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", - "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", - "dev": true, - "requires": { - "browser-resolve": "^2.0.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -12927,18 +8374,6 @@ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true - }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -12955,58 +8390,20 @@ "dev": true }, "npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { - "path-key": "^4.0.0" - }, - "dependencies": { - "path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true - } + "path-key": "^3.0.0" } }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true - }, "object-inspect": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, "object.defaults": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", @@ -13038,14 +8435,11 @@ "isobject": "^3.0.1" } }, - "on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true }, "once": { "version": "1.4.0", @@ -13057,12 +8451,12 @@ } }, "onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { - "mimic-fn": "^4.0.0" + "mimic-fn": "^2.1.0" } }, "optionator": { @@ -13079,12 +8473,6 @@ "word-wrap": "^1.2.3" } }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", - "dev": true - }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -13107,14 +8495,11 @@ "os-tmpdir": "^1.0.0" } }, - "outpipe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", - "integrity": "sha512-BnNY/RwnDrkmQdUa9U+OfN/Y7AWmKuUPCCd+hbRclZnnANvYpO72zp/a6Q4n829hPbdqEac31XCcsvlEvb+rtA==", - "dev": true, - "requires": { - "shell-quote": "^1.4.2" - } + "ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true }, "p-limit": { "version": "3.1.0", @@ -13149,12 +8534,6 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -13164,28 +8543,6 @@ "callsites": "^3.0.0" } }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", - "dev": true, - "requires": { - "path-platform": "~0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, "parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -13203,18 +8560,6 @@ "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -13227,6 +8572,12 @@ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -13239,12 +8590,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", - "dev": true - }, "path-root": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", @@ -13260,10 +8605,10 @@ "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", "dev": true }, "pathval": { @@ -13272,18 +8617,11 @@ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true }, "performance-now": { "version": "2.1.0", @@ -13291,12 +8629,6 @@ "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -13310,9 +8642,9 @@ "dev": true }, "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true }, "pkg-up": { @@ -13387,16 +8719,10 @@ "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "dev": true }, "psl": { @@ -13405,26 +8731,14 @@ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "punycode": { @@ -13433,31 +8747,10 @@ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, - "qjobs": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", - "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", - "dev": true - }, "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "queue-microtask": { @@ -13466,6 +8759,12 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "rambda": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", + "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -13475,72 +8774,35 @@ "safe-buffer": "^5.1.0" } }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true }, - "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, - "requires": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha512-3ALe0bjBVZtkdWKIcThYpQCLbBMd/+Tbh2CDSrAIDO3UsZ4Xs+tnyjv2MjCOMMgBG+AsUOeuP1cgtY1INISc8w==", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true } } }, @@ -13562,57 +8824,38 @@ "resolve": "^1.9.0" } }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - } - }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { - "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", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true - } + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, + "requires": { + "throttleit": "^1.0.0" } }, "require-directory": { @@ -13621,10 +8864,10 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { @@ -13679,23 +8922,6 @@ "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - } } }, "reusify": { @@ -13719,14 +8945,13 @@ "glob": "^7.1.3" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "rollup": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.3.tgz", + "integrity": "sha512-qfadtkY5kl0F5e4dXVdj2D+GtOdifasXHFMiL1SMf9ADQDv5Eti6xReef9FKj+iQPR2pvtqWna57s/PjARY4fg==", "dev": true, "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "fsevents": "~2.3.2" } }, "run-parallel": { @@ -13739,9 +8964,9 @@ } }, "rxjs": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz", - "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -13753,12 +8978,6 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, - "safe-json-parse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz", - "integrity": "sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A==", - "dev": true - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -13766,10 +8985,13 @@ "dev": true }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "serialize-javascript": { "version": "6.0.0", @@ -13780,29 +9002,91 @@ "randombytes": "^2.1.0" } }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "serve": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", + "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "@zeit/schemas": "2.21.0", + "ajv": "8.11.0", + "arg": "5.0.2", + "boxen": "7.0.0", + "chalk": "5.0.1", + "chalk-template": "0.4.0", + "clipboardy": "3.0.0", + "compression": "1.7.4", + "is-port-reachable": "4.0.0", + "serve-handler": "6.1.3", + "update-check": "1.5.4" + }, + "dependencies": { + "ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "chalk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } } }, - "shasum-object": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "serve-handler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, "requires": { - "fast-safe-stringify": "^2.0.7" + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.0.4", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "~1.33.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "shebang-command": { @@ -13820,41 +9104,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "shell-quote": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, "slice-ansi": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", @@ -13866,53 +9121,41 @@ }, "dependencies": { "ansi-styles": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", - "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true } } }, - "socket.io": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.2.tgz", - "integrity": "sha512-6fCnk4ARMPZN448+SQcnn1u8OHUC72puJcNtSgg2xS34Cu7br1gQ09YKkO1PFfDn/wyUE9ZgMAwosJed003+NQ==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "~2.0.0", - "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" - } - }, - "socket.io-adapter": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", - "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", - "dev": true - }, - "socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", - "dev": true, - "requires": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - } - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, "sshpk": { @@ -13925,167 +9168,36 @@ "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" - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true - }, - "stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, - "requires": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==", - "dev": true, - "requires": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", - "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "streamroller": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.2.tgz", - "integrity": "sha512-wZswqzbgGGsXYIrBYhOE0yP+nQ6XRk7xDcYwuQAGTYXdyAUmvgVFE0YU1g5pvQT0m7GBaQfYcSnlHbapuK0H0A==", - "dev": true, - "requires": { - "date-format": "^4.0.13", - "debug": "^4.3.4", - "fs-extra": "^8.1.0" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true - }, - "string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, - "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } + "string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true }, - "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } } }, "strip-ansi": { @@ -14098,9 +9210,9 @@ } }, "strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, "strip-json-comments": { @@ -14109,19 +9221,10 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -14133,13 +9236,24 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "terser": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, "requires": { - "acorn-node": "^1.2.0" + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "text-table": { @@ -14148,56 +9262,18 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha512-PIxwAupJZiYU4JmVZYwXp9FKsHMXb5h0ZEFyuXTAn8WLHOlcij+FEcbrvDsom1o5dr1YggEtFbECvGCW2sT53Q==", - "dev": true, - "requires": { - "process": "~0.11.0" - } - }, - "tiny-lr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz", - "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==", - "dev": true, - "requires": { - "body": "^5.1.0", - "debug": "^3.1.0", - "faye-websocket": "~0.10.0", - "livereload-js": "^2.3.0", - "object-assign": "^4.1.0", - "qs": "^6.4.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -14207,12 +9283,6 @@ "rimraf": "^3.0.0" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -14222,12 +9292,6 @@ "is-number": "^7.0.0" } }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true - }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -14252,12 +9316,6 @@ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -14294,75 +9352,16 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "ua-parser-js": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", - "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", - "dev": true - }, - "uglify-js": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz", - "integrity": "sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==", - "dev": true - }, - "umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", "dev": true }, - "undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "dev": true, - "requires": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - } - }, "underscore": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", - "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==", + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, "underscore-deep-extend": { @@ -14379,36 +9378,28 @@ "requires": { "sprintf-js": "^1.1.1", "util-deprecate": "^1.0.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - } } }, "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true }, - "update-browserslist-db": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.7.tgz", - "integrity": "sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==", + "update-check": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", + "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", "dev": true, "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" } }, "uri-js": { @@ -14428,60 +9419,16 @@ } } }, - "uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", - "dev": true - } - } - }, - "util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true - }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "v8flags": { @@ -14508,130 +9455,66 @@ "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - } } }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "void-elements": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", - "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", - "dev": true + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } }, - "watchify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/watchify/-/watchify-4.0.0.tgz", - "integrity": "sha512-2Z04dxwoOeNxa11qzWumBTgSAohTC0+ScuY7XMenPnH+W2lhTcpEOJP4g2EIG/SWeLadPk47x++Yh+8BqPM/lA==", + "widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, "requires": { - "anymatch": "^3.1.0", - "browserify": "^17.0.0", - "chokidar": "^3.4.0", - "defined": "^1.0.0", - "outpipe": "^1.1.0", - "through2": "^4.0.2", - "xtend": "^4.0.2" + "string-width": "^5.0.1" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" } }, - "through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { - "readable-stream": "3" + "ansi-regex": "^6.0.1" } } } }, - "websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "requires": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz", - "integrity": "sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.20.0", - "for-each": "^0.3.3", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.9" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -14647,31 +9530,6 @@ "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - } } }, "wrappy": { @@ -14680,29 +9538,22 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", - "dev": true, - "requires": {} - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yaml": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.1.tgz", - "integrity": "sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true }, "yargs": { @@ -14718,31 +9569,6 @@ "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - } } }, "yargs-parser": { @@ -14761,6 +9587,24 @@ "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } }, "yocto-queue": { diff --git a/package.json b/package.json index 9c64d29..f0eb96e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "system-runtime", - "version": "5.1.0", + "version": "6.0.0", "description": "A JavaScript library that runs systems", "homepage": "https://designfirst.io/systemruntime/", "keywords": [ @@ -17,6 +17,7 @@ "runtime", "bundle" ], + "type": "module", "main": "./src/runtime.js", "author": { "name": "erwan carriou", @@ -31,38 +32,33 @@ "url": "https://github.com/design-first/system-runtime/issues" }, "scripts": { - "dev": "grunt dev", - "test": "grunt test", - "clean": "grunt clean", - "build": "grunt build", - "coveralls": "grunt coveralls", - "prepare": "husky install" + "build": "grunt system && rollup --config rollup.config.js && grunt licence && prettier --write src/system.js", + "example": "serve", + "prettier": "prettier --write src/", + "lint": "eslint --ext .js src/", + "prepare": "husky install", + "test": "mocha && cypress run" }, "devDependencies": { + "@rollup/plugin-terser": "0.1.0", "chai": "4.3.6", - "coveralls": "3.1.1", + "cypress": "10.11.0", + "eslint": "8.26.0", + "eslint-plugin-mocha": "10.1.0", "grunt": "1.5.3", - "grunt-browserify": "6.0.0", "grunt-cli": "1.4.3", "grunt-contrib-clean": "2.0.1", "grunt-contrib-concat": "2.1.0", - "grunt-contrib-uglify": "5.2.2", - "grunt-contrib-watch": "1.1.0", - "grunt-eslint": "24.0.0", "grunt-json-merge": "0.2.2", - "grunt-karma": "4.0.2", - "grunt-mocha-istanbul": "5.0.2", "husky": "8.0.1", - "istanbul": "0.4.5", - "karma": "6.4.0", - "karma-chai": "0.1.0", - "karma-chrome-launcher": "3.1.1", - "karma-coverage": "2.2.0", - "karma-mocha": "2.0.1", - "karma-script-launcher": "1.0.0", "lint-staged": "13.0.3", "load-grunt-tasks": "5.1.0", - "mocha": "10.0.0", - "prettier": "2.7.1" + "mocha": "10.1.0", + "prettier": "2.7.1", + "rollup": "3.2.3", + "serve": "14.0.1" + }, + "engines": { + "node": ">= 16.0.0" } } diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..d008ef7 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,31 @@ +/* + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import terser from '@rollup/plugin-terser' + +export default { + input: 'src/runtime.js', + output: { + file: 'dist/system-runtime.js', + format: 'es', + sourcemap: true, + }, + plugins: [terser()], +} diff --git a/src/banners/systemmodule-footer.txt b/src/banners/systemmodule-footer.txt index 092bc2b..9c80291 100644 --- a/src/banners/systemmodule-footer.txt +++ b/src/banners/systemmodule-footer.txt @@ -1 +1 @@ -; +}; diff --git a/src/banners/systemmodule-header.txt b/src/banners/systemmodule-header.txt index 534c91f..1f051b5 100644 --- a/src/banners/systemmodule-header.txt +++ b/src/banners/systemmodule-header.txt @@ -18,19 +18,18 @@ * limitations under the License. */ +/* !! This file has been generated, do not edit it !! */ + /** * @module system * @description This module contains System Runtime core system. */ -'use strict'; - - /* Public properties */ /** * System Runtime core system - * @property {_System} system + * @property {Object} system */ -exports.system = \ No newline at end of file +export default {system: \ No newline at end of file diff --git a/src/behavior.js b/src/behavior.js index 2cf5967..c39da3a 100644 --- a/src/behavior.js +++ b/src/behavior.js @@ -28,15 +28,13 @@ * when a specific state of a component will change. */ -'use strict'; - -var $db = require('./db.js'); -var $helper = require('./helper.js'); -var $mson = require('./mson.js'); +import $db from './db.js' +import $helper from './helper.js' +import $mson from './mson.js' /* Private properties */ -var store = {}; +let store = {} /* Private methods */ @@ -54,114 +52,138 @@ var store = {}; * - can have some core modules injected as parameters */ function createFunction(name, func, useCoreAPI) { - var beginBody = -1; - var funcParams = ''; - var params = []; - var paramsClean = []; - var funcBody = ''; - var header = ''; - var action = null; - var isArrowFunction = true; - var isOneLine = false; - var functionName = name; + let beginBody = -1 + let funcParams = '' + let params = [] + let paramsClean = [] + let funcBody = '' + let header = '' + let action = null + let isArrowFunction = true + let isAsync = false + let isOneLine = false + let functionName = name if (functionName.indexOf('.') !== -1) { - functionName = name.split('.')[name.split('.').length - 1]; + functionName = name.split('.')[name.split('.').length - 1] + } + + if (func.trim().indexOf('async') === 0) { + isAsync = true + func = func.replace('async', '') } if (func.trim().indexOf('function') === 0) { - isArrowFunction = false; + isArrowFunction = false } if (isArrowFunction) { - beginBody = func.indexOf('=>'); + beginBody = func.indexOf('=>') - header = func.substring(0, beginBody); - header = header.replace('=>', ''); + header = func.substring(0, beginBody) + header = header.replace('=>', '') if (header.indexOf('(') !== -1) { - funcParams = header.split('(')[1].replace(')', '').trim(); + funcParams = header.split('(')[1].replace(')', '').trim() } else { - funcParams = header.trim(); + funcParams = header.trim() } - params = funcParams.split(','); + params = funcParams.split(',') params.forEach(function (param) { - paramsClean.push(param.trim()); - }); + paramsClean.push(param.trim()) + }) - funcBody = func.substring(beginBody + 2, func.length).trim(); + funcBody = func.substring(beginBody + 2, func.length).trim() if (funcBody.indexOf('{') === 0) { - funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim(); + funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim() } if (funcBody.indexOf('\n') === -1) { - isOneLine = true; + isOneLine = true } if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) { - funcBody = 'return ' + funcBody; + funcBody = 'return ' + funcBody } } else { - beginBody = func.indexOf('{'); - header = func.substring(0, beginBody); + beginBody = func.indexOf('{') + header = func.substring(0, beginBody) - funcParams = header.split('(')[1].replace(')', '').trim(); + funcParams = header.split('(')[1].replace(')', '').trim() - params = funcParams.split(','); + params = funcParams.split(',') params.forEach(function (param) { - paramsClean.push(param.trim()); - }); + paramsClean.push(param.trim()) + }) - funcBody = func.substring(beginBody + 1); - funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim(); + funcBody = func.substring(beginBody + 1) + funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim() } - // kludge for Babel - funcBody = funcBody.replace(/_this/g, 'this'); + // fix for Babel + funcBody = funcBody.replace(/_this/g, 'this') if (paramsClean[0] === '') { - paramsClean = []; + paramsClean = [] } if (useCoreAPI) { - paramsClean.push('$component'); - paramsClean.push('$db'); - paramsClean.push('$metamodel'); - paramsClean.push('$workflow'); - paramsClean.push('$behavior'); - paramsClean.push('$state'); - paramsClean.push('$log'); - paramsClean.push('$helper'); - paramsClean.push('$history'); - } - - if ($helper.isOnNode()) { - paramsClean.push('require'); + paramsClean.push('$component') + paramsClean.push('$db') + paramsClean.push('$metamodel') + paramsClean.push('$workflow') + paramsClean.push('$behavior') + paramsClean.push('$state') + paramsClean.push('$log') + paramsClean.push('$helper') + paramsClean.push('$history') } - if (paramsClean[0] !== '') { - action = new Function( - '__action', - 'return function ' + - functionName + - ' (' + - paramsClean.join(', ') + - ") { return new Function('" + - paramsClean.join("', '") + - "', __action).apply(this, arguments) };" - )(funcBody); + if (isAsync) { + if (paramsClean[0] !== '') { + action = new Function( + '__action', + 'return function ' + + functionName + + ' (' + + paramsClean.join(', ') + + ") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('" + + paramsClean.join("', '") + + "', __action).apply(this, arguments) };" + )(funcBody) + } else { + action = new Function( + '__action', + 'return function ' + + functionName + + ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };' + )(funcBody) + } } else { - action = new Function( - '__action', - 'return function ' + - functionName + - ' () { return new Function(__action).apply(this, arguments) };' - )(funcBody); + if (paramsClean[0] !== '') { + action = new Function( + '__action', + 'return function ' + + functionName + + ' (' + + paramsClean.join(', ') + + ") { return new Function('" + + paramsClean.join("', '") + + "', __action).apply(this, arguments) };" + )(funcBody) + } else { + action = new Function( + '__action', + 'return function ' + + functionName + + ' () { return new Function(__action).apply(this, arguments) };' + )(funcBody) + } } - return action; + return action } /* Public methods */ @@ -176,22 +198,22 @@ function createFunction(name, func, useCoreAPI) { * @returns {String} id of the behavior created in System Runtime database * @description Add a behavior that will be stored in System Runtime database */ -exports.add = function add(id, state, action, useCoreAPI, core, context) { - var behaviorId = $helper.generateId(); - var strAction = action.toString(); +function add(id, state, action, useCoreAPI, core, context) { + let behaviorId = $helper.generateId() + let strAction = action.toString() if (typeof core === 'undefined') { - core = false; + core = false } if (typeof useCoreAPI === 'undefined') { - useCoreAPI = false; + useCoreAPI = false } - action = createFunction(state, strAction, useCoreAPI); + action = createFunction(state, strAction, useCoreAPI) - store[behaviorId] = action; + store[behaviorId] = action - $db._Behavior.insert({ + $db.collections._Behavior.insert({ _id: behaviorId, component: id, state: state, @@ -199,10 +221,10 @@ exports.add = function add(id, state, action, useCoreAPI, core, context) { useCoreAPI: useCoreAPI, core: core, context: context, - }); + }) - return behaviorId; -}; + return behaviorId +} /** * @method remove @@ -213,48 +235,48 @@ exports.add = function add(id, state, action, useCoreAPI, core, context) { * @description Remove a behavior with its id or remove all the behaviors for a specific state * of the component */ -exports.remove = function remove(params) { - var result = []; +function remove(params) { + let result = [] - params = params || {}; - params.behaviorId = params.behaviorId || ''; - params.componentId = params.componentId || ''; - params.state = params.state || ''; + params = params || {} + params.behaviorId = params.behaviorId || '' + params.componentId = params.componentId || '' + params.state = params.state || '' if (params.componentId) { if (params.behaviorId) { - $db._Behavior.remove({ + $db.collections._Behavior.remove({ _id: params.behaviorId, component: params.componentId, state: params.state, - }); - delete store[params.behaviorId]; + }) + delete store[params.behaviorId] } else { if (params.state) { - result = $db._Behavior.remove({ + result = $db.collections._Behavior.remove({ component: params.componentId, state: params.state, - }); + }) } else { - result = $db._Behavior.remove({ + result = $db.collections._Behavior.remove({ component: params.componentId, - }); + }) } result.forEach(function (id) { - delete store[id]; - }); + delete store[id] + }) } } -}; +} /** * @method removeFromMemory * @param {String} id id of the component * @description Remove a behavior with its id from the memory */ -exports.removeFromMemory = function removeFromMemory(id) { - delete store[id]; -}; +function removeFromMemory(id) { + delete store[id] +} /** * @method getActions @@ -263,43 +285,43 @@ exports.removeFromMemory = function removeFromMemory(id) { * @returns {Array} all the actions that have to be executed for a specific component and state * @description Get all the actions of a behavior for a component */ -exports.getActions = function getActions(id, state) { - var result = []; - var dbResult = []; - var action = null; +function getActions(id, state) { + let result = [] + let dbResult = [] + let action = null - dbResult = $db._Behavior.find({ + dbResult = $db.collections._Behavior.find({ component: id, state: state, - }); + }) dbResult.forEach(function (behavior) { - action = store[behavior[$mson.ID]]; + action = store[behavior[$mson.ID]] if (typeof action === 'undefined') { action = createFunction( behavior.state, behavior.action, behavior.useCoreAPI - ); - store[behavior[$mson.ID]] = action; + ) + store[behavior[$mson.ID]] = action } result.push({ useCoreAPI: behavior.useCoreAPI, context: behavior.context, action: action, - }); - }); + }) + }) - return result; -}; + return result +} /** * @method clear * @description Remove all the behaviors stored in memory */ -exports.clear = function clear() { - store = {}; -}; +function clear() { + store = {} +} /** * @method get @@ -307,6 +329,15 @@ exports.clear = function clear() { * @returns {Behavior} the behavior * @description Get a behavior by its id */ -exports.get = function get(id) { - return store[id]; -}; +function get(id) { + return store[id] +} + +export default { + add, + remove, + removeFromMemory, + getActions, + clear, + get, +} diff --git a/src/component.js b/src/component.js index 22210d1..9df366e 100644 --- a/src/component.js +++ b/src/component.js @@ -33,21 +33,19 @@ * It is the factory of all the components that are created by System Runtime. */ -'use strict'; - -var $workflow = require('./workflow.js'); -var $db = require('./db.js'); -var $metamodel = require('./metamodel.js'); -var $behavior = require('./behavior.js'); -var $helper = require('./helper.js'); -var $log = require('./log.js'); -var $history = require('./history.js'); -var $state = require('./state.js'); -var $mson = require('./mson.js'); +import $workflow from './workflow.js' +import $db from './db.js' +import $metamodel from './metamodel.js' +import $behavior from './behavior.js' +import $helper from './helper.js' +import $log from './log.js' +import $history from './history.js' +import $state from './state.js' +import $mson from './mson.js' /* Private properties */ -var store = {}; +let store = {} /* Private methods */ @@ -61,36 +59,36 @@ var store = {}; * @description Sub class to override many methods of Array Class */ function _Array(conf) { - var arr = []; - var arrDb = []; - var type = ''; - var id = ''; - var classId = ''; - var propertyName = ''; - var isReadOnly = false; - var isClassName = false; - - conf = conf || {}; - type = conf.type || ''; - id = conf.id || ''; - propertyName = conf.propertyName || ''; - arrDb = conf.arr || []; - classId = conf.classId || ''; + let arr = [] + let arrDb = [] + let type = '' + let id = '' + let classId = '' + let propertyName = '' + let isReadOnly = false + let isClassName = false + + conf = conf || {} + type = conf.type || '' + id = conf.id || '' + propertyName = conf.propertyName || '' + arrDb = conf.arr || [] + classId = conf.classId || '' if (typeof conf.readOnly !== 'undefined') { - isReadOnly = conf.readOnly; + isReadOnly = conf.readOnly } - isClassName = $metamodel.isClassName(type); + isClassName = $metamodel.isClassName(type) // init arrDb.forEach(function (val) { if (isClassName) { - arr.push($helper.getRuntime().require(val)); + arr.push($helper.getRuntime().require(val)) } else { - arr.push(val); + arr.push(val) } - }); + }) /** * @method _copy @@ -98,23 +96,23 @@ function _Array(conf) { * @description copy the array */ function _copy() { - var i = 0; - var j = 0; - var length = arr.length; + let i = 0 + let j = 0 + let length = arr.length arrDb.forEach(function (val) { if (isClassName) { - arr[i] = $helper.getRuntime().require(val); + arr[i] = $helper.getRuntime().require(val) } else { - arr[i] = val; + arr[i] = val } - i = i + 1; - }); + i = i + 1 + }) for (j = i; j < length; j++) { - delete arr[j]; + delete arr[j] } - arr.length = arrDb.length; + arr.length = arrDb.length } /** @@ -127,13 +125,13 @@ function _Array(conf) { * @description add an item in the array */ function _add(val, action, start, deleteCount) { - var i = 0; - var length = 0; - var del = []; - var oldValue = null; + let i = 0 + let length = 0 + let del = [] + let oldValue = null if ($history.isEnabled()) { - oldValue = JSON.stringify(arrDb); + oldValue = JSON.stringify(arrDb) } if (!isReadOnly) { @@ -141,25 +139,25 @@ function _Array(conf) { if (val && $metamodel.inheritFrom(val.constructor.name, type)) { switch (true) { case action === 'push': - arrDb.push(val.id()); - break; + arrDb.push(val.id()) + break case action === 'unshift': - arrDb.unshift(val.id()); - break; + arrDb.unshift(val.id()) + break case action === 'splice': - del = arrDb.splice(start, deleteCount, val); + del = arrDb.splice(start, deleteCount, val) - length = del.length; + length = del.length for (i = 0; i < length; i++) { $workflow.process({ component: id, state: propertyName, data: [store[del[i]], 'remove'], - }); + }) } - break; + break default: - break; + break } if ($history.isEnabled() && classId.indexOf('_') !== 0) { @@ -170,7 +168,7 @@ function _Array(conf) { field: propertyName, value: JSON.stringify(arrDb), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -179,31 +177,31 @@ function _Array(conf) { id: id, field: propertyName, value: arrDb, - }); + }) } $workflow.process({ component: id, state: propertyName, data: [val, 'add'], - }); + }) } else { - $log.invalidPropertyName(id, classId, propertyName, val, type); + $log.invalidPropertyName(id, classId, propertyName, val, type) } } else { if (val && $metamodel.isValidType(val, type)) { switch (true) { case action === 'push': - arrDb.push(val); - break; + arrDb.push(val) + break case action === 'unshift': - arrDb.unshift(val); - break; + arrDb.unshift(val) + break case action === 'splice': - arrDb.splice(start, deleteCount, val); - break; + arrDb.splice(start, deleteCount, val) + break default: - break; + break } if ($history.isEnabled() && classId.indexOf('_') !== 0) { @@ -214,7 +212,7 @@ function _Array(conf) { field: propertyName, value: JSON.stringify(arrDb), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -223,22 +221,22 @@ function _Array(conf) { id: id, field: propertyName, value: arrDb, - }); + }) } $workflow.process({ component: id, state: propertyName, data: [val, 'add'], - }); + }) } else { - $log.invalidPropertyName(id, classId, propertyName, val, type); + $log.invalidPropertyName(id, classId, propertyName, val, type) } } } else { - $log.readOnlyProperty(id, classId, propertyName); + $log.readOnlyProperty(id, classId, propertyName) } - return arrDb.length; + return arrDb.length } /** @@ -248,25 +246,25 @@ function _Array(conf) { * @description remove an item from the array */ function _remove(action) { - var result; - var val = null; - var oldValue = null; + let result + let val = null + let oldValue = null if ($history.isEnabled()) { - oldValue = JSON.stringify(arrDb); + oldValue = JSON.stringify(arrDb) } if (!isReadOnly) { if (arrDb.length !== 0) { switch (true) { case action === 'pop': - val = arrDb.pop(); - break; + val = arrDb.pop() + break case action === 'shift': - val = arrDb.shift(); - break; + val = arrDb.shift() + break default: - break; + break } if ($history.isEnabled() && classId.indexOf('_') !== 0) { @@ -277,7 +275,7 @@ function _Array(conf) { field: propertyName, value: JSON.stringify(arrDb), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -286,25 +284,25 @@ function _Array(conf) { id: id, field: propertyName, value: arrDb, - }); + }) } if (isClassName) { - result = store[val]; + result = store[val] } else { - result = val; + result = val } $workflow.process({ component: id, state: propertyName, data: [result, 'remove'], - }); + }) } } else { - $log.readOnlyProperty(id, classId, propertyName); + $log.readOnlyProperty(id, classId, propertyName) } - return result; + return result } /** @@ -313,12 +311,12 @@ function _Array(conf) { * @description Override push method */ arr.push = function push(val) { - var result = _add(val, 'push'); + let result = _add(val, 'push') - arr[arr.length] = val; + arr[arr.length] = val - return result; - }; + return result + } /** * @method pop @@ -326,16 +324,16 @@ function _Array(conf) { * @description Override pop method */ arr.pop = function pop() { - var result = _remove('pop'); - var length = arr.length; + let result = _remove('pop') + let length = arr.length if (length !== 0) { - delete arr[length]; - arr.length = length - 1; + delete arr[length] + arr.length = length - 1 } - return result; - }; + return result + } /** * @method shift @@ -343,11 +341,11 @@ function _Array(conf) { * @description Override shift method */ arr.shift = function shift() { - var result = _remove('shift'); - _copy(); + let result = _remove('shift') + _copy() - return result; - }; + return result + } /** * @method unshift @@ -355,11 +353,11 @@ function _Array(conf) { * @description Override unshift method */ arr.unshift = function unshift(val) { - var result = _add(val, 'unshift'); - _copy(); + let result = _add(val, 'unshift') + _copy() - return result; - }; + return result + } /** * @method push @@ -367,24 +365,24 @@ function _Array(conf) { * @description Override concat method */ arr.concat = function concat(arr) { - var i = 0; - var length = 0; - var result = null; + let i = 0 + let length = 0 + let result = null if (Array.isArray(arr)) { - length = arr.length; + length = arr.length for (i = 0; i < length; i++) { - _add(arr[i], 'push'); + _add(arr[i], 'push') } } - conf.arr = arrDb; + conf.arr = arrDb - result = new _Array(conf); - _copy(); + result = new _Array(conf) + _copy() - return result; - }; + return result + } /** * @method sort @@ -393,13 +391,13 @@ function _Array(conf) { * @description Override sort method */ arr.sort = function sort(funct) { - var oldValue = null; + let oldValue = null if ($history.isEnabled()) { - oldValue = JSON.stringify(arrDb); + oldValue = JSON.stringify(arrDb) } - arrDb.sort(funct); + arrDb.sort(funct) if ($history.isEnabled() && classId.indexOf('_') !== 0) { $history.pushState({ @@ -409,7 +407,7 @@ function _Array(conf) { field: propertyName, value: JSON.stringify(arrDb), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -418,13 +416,13 @@ function _Array(conf) { id: id, field: propertyName, value: arrDb, - }); + }) } - _copy(); + _copy() - return arr; - }; + return arr + } /** * @method reverse @@ -432,12 +430,12 @@ function _Array(conf) { * @description Override reverse method */ arr.reverse = function reverse() { - var oldValue = null; + let oldValue = null if ($history.isEnabled()) { - oldValue = JSON.stringify(arrDb); + oldValue = JSON.stringify(arrDb) } - arrDb.reverse(); + arrDb.reverse() if ($history.isEnabled() && classId.indexOf('_') !== 0) { $history.pushState({ @@ -447,7 +445,7 @@ function _Array(conf) { field: propertyName, value: JSON.stringify(arrDb), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -456,13 +454,13 @@ function _Array(conf) { id: id, field: propertyName, value: arrDb, - }); + }) } - _copy(); + _copy() - return arr; - }; + return arr + } /** * @method splice @@ -470,20 +468,20 @@ function _Array(conf) { * @description Override splice method */ arr.splice = function splice(start, deleteCount, val) { - var oldValue = null; - var result = []; - var i = 0; - var length = 0; - var data = null; + let oldValue = null + let result = [] + let i = 0 + let length = 0 + let data = null if ($history.isEnabled()) { - oldValue = JSON.stringify(arrDb); + oldValue = JSON.stringify(arrDb) } if (typeof val !== 'undefined') { - _add(val, 'splice', start, deleteCount); + _add(val, 'splice', start, deleteCount) } else { - result = arrDb.splice(start, deleteCount); + result = arrDb.splice(start, deleteCount) if ($history.isEnabled() && classId.indexOf('_') !== 0) { $history.pushState({ @@ -493,7 +491,7 @@ function _Array(conf) { field: propertyName, value: JSON.stringify(arrDb), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -502,29 +500,29 @@ function _Array(conf) { id: id, field: propertyName, value: arrDb, - }); + }) } - length = result.length; + length = result.length for (i = 0; i < length; i++) { if (isClassName) { - data = store[result[i]]; + data = store[result[i]] } else { - data = result[i]; + data = result[i] } $workflow.process({ component: id, state: propertyName, data: [data, 'remove'], - }); + }) } } - _copy(); + _copy() - return result; - }; + return result + } /** * @method slice @@ -532,16 +530,16 @@ function _Array(conf) { * @description Override slice method */ arr.slice = function slice(begin, end) { - var result = arrDb.slice(begin, end); - _copy(); + let result = arrDb.slice(begin, end) + _copy() - return result; - }; + return result + } - return arr; + return arr } -_Array.prototype = []; +_Array.prototype = [] /** * @method getParamNames @@ -552,19 +550,19 @@ _Array.prototype = []; * @description Get all the names of method parameters */ function getParamNames(id, methodName) { - var params = []; - var result = []; - var length = 0; - var i = 0; + let params = [] + let result = [] + let length = 0 + let i = 0 - params = $metamodel.getModel(id)[methodName].params; + params = $metamodel.getModel(id)[methodName].params if (params) { - length = params.length; + length = params.length for (i = 0; i < length; i++) { - result.push(params[i].name); + result.push(params[i].name) } } - return result; + return result } /** @@ -575,19 +573,19 @@ function getParamNames(id, methodName) { * @description Get all the property of a class */ function getProperties(id) { - var model = null; - var schema = null; - var propNames = []; - var length = 0; - var i = 0; - var result = []; + let model = null + let schema = null + let propNames = [] + let length = 0 + let i = 0 + let result = [] - model = $metamodel.getModel(id); - schema = $metamodel.getSchema(model[$mson.NAME]); + model = $metamodel.getModel(id) + schema = $metamodel.getSchema(model[$mson.NAME]) - propNames = Object.keys(schema); + propNames = Object.keys(schema) - length = propNames.length; + length = propNames.length for (i = 0; i < length; i++) { if ( schema[propNames[i]] === $mson.LINK_TYPE || @@ -598,11 +596,11 @@ function getProperties(id) { name: propNames[i], type: model[propNames[i]].type, readOnly: model[propNames[i]].readOnly, - }); + }) } } - return result; + return result } /** @@ -613,26 +611,26 @@ function getProperties(id) { * @description Get all the method of a class */ function getMethods(id) { - var model = null; - var schema = null; - var propNames = []; - var length = 0; - var i = 0; - var result = []; + let model = null + let schema = null + let propNames = [] + let length = 0 + let i = 0 + let result = [] - model = $metamodel.getModel(id); - schema = $metamodel.getSchema(model[$mson.NAME]); + model = $metamodel.getModel(id) + schema = $metamodel.getSchema(model[$mson.NAME]) - propNames = Object.keys(schema); + propNames = Object.keys(schema) - length = propNames.length; + length = propNames.length for (i = 0; i < length; i++) { if (schema[propNames[i]] === $mson.METHOD_TYPE) { - result.push(propNames[i]); + result.push(propNames[i]) } } - return result; + return result } /** @@ -644,23 +642,23 @@ function getMethods(id) { * @description Get the schema of a structure */ function getStructureProperties(path, model) { - var type = null; - var structure = null; - var result = []; - var propNames = []; + let type = null + let structure = null + let result = [] + let propNames = [] - type = $metamodel.getModelPathType(model, path); - structure = $metamodel.getType(type); + type = $metamodel.getModelPathType(model, path) + structure = $metamodel.getType(type) if (structure && structure.schema) { - propNames = Object.keys(structure.schema); + propNames = Object.keys(structure.schema) propNames.forEach(function (name) { - structure.schema[name].name = name; - result.push(structure.schema[name]); - }); + structure.schema[name].name = name + result.push(structure.schema[name]) + }) } - return result; + return result } /** @@ -671,26 +669,26 @@ function getStructureProperties(path, model) { * @description Get all the event of a class */ function getEvents(id) { - var model = null; - var schema = null; - var propNames = []; - var length = 0; - var i = 0; - var result = []; + let model = null + let schema = null + let propNames = [] + let length = 0 + let i = 0 + let result = [] - model = $metamodel.getModel(id); - schema = $metamodel.getSchema(model[$mson.NAME]); + model = $metamodel.getModel(id) + schema = $metamodel.getSchema(model[$mson.NAME]) - propNames = Object.keys(schema); + propNames = Object.keys(schema) - length = propNames.length; + length = propNames.length for (i = 0; i < length; i++) { if (schema[propNames[i]] === $mson.EVENT_TYPE) { - result.push(propNames[i]); + result.push(propNames[i]) } } - return result; + return result } /** @@ -703,28 +701,28 @@ function getEvents(id) { * @description Get the value of a structure */ function getStructureValue(model, id, path) { - var result = null; - var doc = $db.store[model][id]; - var subPath = path.split('.'); - var length = subPath.length; - var i = 0; - var arr = ''; - var index = -1; + let result = null + let doc = $db.store[model][id] + let subPath = path.split('.') + let length = subPath.length + let i = 0 + let arr = '' + let index = -1 - result = doc; + result = doc for (i = 0; i < length; i++) { if (subPath[i].indexOf('[') !== -1) { - arr = subPath[i].split('[')[0]; - index = subPath[i].split('[')[1].replace(']', ''); - result = result[arr][index]; + arr = subPath[i].split('[')[0] + index = subPath[i].split('[')[1].replace(']', '') + result = result[arr][index] } else { if (result) { - result = result[subPath[i]]; + result = result[subPath[i]] } } } - return result; + return result } /** @@ -737,26 +735,26 @@ function getStructureValue(model, id, path) { * @description Set the value of a structure */ function setStructureValue(model, id, path, value) { - var result = null; - var doc = $db.store[model][id]; - var subPath = path.split('.'); - var length = subPath.length; - var i = 0; - var arr = ''; - var index = -1; + let result = null + let doc = $db.store[model][id] + let subPath = path.split('.') + let length = subPath.length + let i = 0 + let arr = '' + let index = -1 - result = doc; + result = doc for (i = 0; i < length - 1; i++) { if (subPath[i].indexOf('[') !== -1) { - arr = subPath[i].split('[')[0]; - index = subPath[i].split('[')[1].replace(']', ''); - result = result[arr][index]; + arr = subPath[i].split('[')[0] + index = subPath[i].split('[')[1].replace(']', '') + result = result[arr][index] } else { - result = result[subPath[i]]; + result = result[subPath[i]] } } - result[subPath[i]] = value; + result[subPath[i]] = value } /** @@ -767,13 +765,13 @@ function setStructureValue(model, id, path, value) { * @description Create a new class from a class definition */ function createClass(classId) { - var proxy = function proxy(config) { - config = config || {}; - var proxy = {}; + let proxy = function proxy(config) { + config = config || {} + let proxy = {} if (config.constructor.name !== 'Object') { - $log.invalidConctructorParameters(config, classId); - config = {}; + $log.invalidConctructorParameters(config, classId) + config = {} } if ( @@ -784,28 +782,28 @@ function createClass(classId) { true ) ) { - $log.invalidParameters(classId, config); + $log.invalidParameters(classId, config) } - $metamodel.prepareObject(config, $metamodel.getModel(classId)); + $metamodel.prepareObject(config, $metamodel.getModel(classId)) if (typeof config[$mson.ID] === 'undefined') { - config[$mson.ID] = $helper.generateId(); + config[$mson.ID] = $helper.generateId() } - store[config[$mson.ID]] = this; + store[config[$mson.ID]] = this // id proxy = function proxy() { - return config[$mson.ID]; - }; + return config[$mson.ID] + } this.id = new Function( '__proxy', 'return function id () { return __proxy.apply(this) };' - )(proxy); + )(proxy) // create link to db - $db.store[classId][config[$mson.ID]] = config; + $db.store[classId][config[$mson.ID]] = config if ($history.isEnabled() && classId.indexOf('_') !== 0) { $history.pushState({ @@ -813,28 +811,28 @@ function createClass(classId) { collection: classId, id: config[$mson.ID], value: JSON.stringify(config), - }); + }) } if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').insert({ collection: classId, document: config, - }); + }) } - Object.freeze(this); + Object.freeze(this) if (this.init) { - this.init(config); + this.init(config) } - }; + } return new Function( '__proxy', 'return function ' + classId + ' (config) { __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } /** @@ -845,13 +843,13 @@ function createClass(classId) { * @description Add an id method to a class that will return its id */ function addIdClass(Class, classId) { - var proxy = function proxy() { - return classId; - }; + let proxy = function proxy() { + return classId + } Class.id = new Function( '__proxy', 'return function id () { return __proxy.apply(this) };' - )(proxy); + )(proxy) } /** @@ -869,20 +867,20 @@ function addIdClass(Class, classId) { * laure.age(22); // set the age of a person */ function addProperties(model, Class, classId) { - var properties = getProperties(model); + let properties = getProperties(model) properties.forEach(function property(prop) { - var proxy = {}; - var propertyName = ''; - var propertyType = ''; - var propertyReadOnly = ''; + let proxy = {} + let propertyName = '' + let propertyType = '' + let propertyReadOnly = '' - propertyName = prop.name; - propertyType = prop.type; - propertyReadOnly = prop.readOnly; + propertyName = prop.name + propertyType = prop.type + propertyReadOnly = prop.readOnly function _isValidCollection(coll, type) { - var result = true; + let result = true if (type !== 'any') { coll.forEach(function (val) { @@ -891,52 +889,52 @@ function addProperties(model, Class, classId) { !$metamodel.isValidType(val, type) && !$metamodel.inheritFrom(val.constructor.name, type) ) { - result = result && false; + result = result && false } } else { if (!$metamodel.isValidType(val, type)) { - result = result && false; + result = result && false } } - }); + }) } - return result; + return result } function _getRealCollection(coll, type) { - var result = []; + let result = [] coll.forEach(function (val) { if ($metamodel.isClassName(type)) { switch (true) { case typeof val === 'string': - result.push(val); - break; + result.push(val) + break case typeof val.id !== 'undefined': - result.push(val.id()); - break; + result.push(val.id()) + break default: - result.push(null); - break; + result.push(null) + break } } else { - result.push(val); + result.push(val) } - }); + }) - return result; + return result } if (Array.isArray(propertyType) || propertyType === 'array') { // in case of array, return a sub array proxy = function proxy(position, value) { - var search = []; - var component = null; - var runtimeArr = null; - var val = null; - var realVal = null; - var oldValue = null; + let search = [] + let component = null + let runtimeArr = null + let val = null + let realVal = null + let oldValue = null if (typeof value === 'undefined') { if (typeof position === 'undefined') { @@ -947,9 +945,9 @@ function addProperties(model, Class, classId) { classId: classId, type: propertyType === 'array' ? 'any' : propertyType[0], arr: $db.store[classId][this.id()][propertyName], - }); + }) - return runtimeArr; + return runtimeArr } else { if (Array.isArray(position)) { // we replace the collection @@ -959,27 +957,27 @@ function addProperties(model, Class, classId) { propertyType === 'array' ? 'any' : propertyType[0] ) ) { - search = $db[classId].find({ + search = $db.collections[classId].find({ _id: this.id(), - }); + }) if (search.length) { - component = search[0]; + component = search[0] realVal = _getRealCollection( position, propertyType === 'array' ? 'any' : propertyType[0] - ); + ) $workflow.process({ component: this.id(), state: propertyName, data: [position, 'reset'], - }); + }) if ($history.isEnabled()) { - oldValue = JSON.stringify(component[propertyName]); + oldValue = JSON.stringify(component[propertyName]) } - component[propertyName] = realVal; + component[propertyName] = realVal if ($history.isEnabled() && classId.indexOf('_') !== 0) { $history.pushState({ @@ -989,7 +987,7 @@ function addProperties(model, Class, classId) { field: propertyName, value: JSON.stringify(component[propertyName]), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -998,7 +996,7 @@ function addProperties(model, Class, classId) { id: this.id(), field: propertyName, value: component[propertyName], - }); + }) } } } else { @@ -1008,36 +1006,36 @@ function addProperties(model, Class, classId) { propertyName, position, propertyType === 'array' ? 'any' : propertyType[0] - ); + ) } } else { if (typeof position === 'number') { - val = $db.store[classId][this.id()][propertyName][position]; + val = $db.store[classId][this.id()][propertyName][position] if (val) { switch (true) { case $metamodel.isClassName( propertyType === 'array' ? 'array' : propertyType[0] ): - realVal = $helper.getRuntime().require(val); - break; + realVal = $helper.getRuntime().require(val) + break case propertyType === 'array' ? 'array' : propertyType[0] === 'date': - realVal = new Date(val); - break; + realVal = new Date(val) + break case $metamodel.isStructure(propertyName, model): realVal = addStructure( '', propertyName + '[' + position + ']', model, this.id() - ); - break; + ) + break default: - realVal = val; - break; + realVal = val + break } - return realVal; + return realVal } } else { $log.invalidPropertyName( @@ -1046,7 +1044,7 @@ function addProperties(model, Class, classId) { propertyName, position, 'number' - ); + ) } } } @@ -1056,7 +1054,7 @@ function addProperties(model, Class, classId) { this.id(), this.constructor.name, propertyName - ); + ) } else { if ( $metamodel.isValidType( @@ -1071,9 +1069,9 @@ function addProperties(model, Class, classId) { propertyType === 'array' ? 'array' : propertyType[0] )) ) { - search = $db[classId].find({ + search = $db.collections[classId].find({ _id: this.id(), - }); + }) if (search.length) { switch (true) { case $metamodel.isClassName( @@ -1081,35 +1079,35 @@ function addProperties(model, Class, classId) { ): switch (true) { case typeof value === 'string': - realVal = value; - break; + realVal = value + break case typeof value.id !== 'undefined': - realVal = value.id(); - break; + realVal = value.id() + break default: - realVal = ''; - break; + realVal = '' + break } - break; + break case Array.isArray(propertyType) ? propertyType[0] : 'any' === 'date': if (typeof value === 'string') { - realVal = value; + realVal = value } else { - realVal = value.toISOString(); + realVal = value.toISOString() } - break; + break default: - realVal = ''; - break; + realVal = '' + break } - component = search[0]; - component[propertyName][position] = realVal; + component = search[0] + component[propertyName][position] = realVal if ($history.isEnabled()) { - oldValue = JSON.stringify(component[propertyName]); + oldValue = JSON.stringify(component[propertyName]) } if ($history.isEnabled() && classId.indexOf('_') !== 0) { @@ -1120,7 +1118,7 @@ function addProperties(model, Class, classId) { field: propertyName, value: JSON.stringify(component[propertyName]), oldValue: oldValue, - }); + }) } if ($helper.isRuntime()) { @@ -1129,14 +1127,14 @@ function addProperties(model, Class, classId) { id: this.id(), field: propertyName, value: component[propertyName], - }); + }) } $workflow.process({ component: this.id(), state: propertyName, data: [value, 'add'], - }); + }) } } else { $log.invalidPropertyName( @@ -1145,39 +1143,39 @@ function addProperties(model, Class, classId) { propertyName, value, propertyType[0] - ); + ) } } } - }; + } Class.prototype[propertyName] = new Function( '__proxy', 'return function ' + propertyName + ' (position, value) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } else { proxy = function proxy(value) { - var search = []; - var component = null; - var propertyValue = null; - var oldValue = null; - var realVal = null; + let search = [] + let component = null + let propertyValue = null + let oldValue = null + let realVal = null if (typeof value === 'undefined') { - component = $db.store[classId][this.id()]; + component = $db.store[classId][this.id()] if (component) { switch (true) { case $metamodel.isClassName(propertyType): - propertyValue = exports.get(component[propertyName]); - break; + propertyValue = get(component[propertyName]) + break case propertyType === 'date': - propertyValue = new Date(component[propertyName]); - break; + propertyValue = new Date(component[propertyName]) + break case propertyType === 'json': - propertyValue = component[propertyName]; - propertyValue = JSON.parse(JSON.stringify(propertyValue)); - break; + propertyValue = component[propertyName] + propertyValue = JSON.parse(JSON.stringify(propertyValue)) + break case propertyType === 'array': propertyValue = new _Array({ id: this.id(), @@ -1186,23 +1184,18 @@ function addProperties(model, Class, classId) { classId: classId, type: 'any', arr: $db.store[classId][this.id()][propertyName], - }); - break; + }) + break case $metamodel.isStructure(propertyName, classId): - propertyValue = addStructure( - '', - propertyName, - model, - this.id() - ); - break; - default: - propertyValue = component[propertyName]; // TODO case of object - break; + propertyValue = addStructure('', propertyName, model, this.id()) + break + default: // TODO case of object + propertyValue = component[propertyName] + break } - return propertyValue; + return propertyValue } else { - $log.destroyedComponentCall(propertyName, this.id()); + $log.destroyedComponentCall(propertyName, this.id()) } } else { if (propertyReadOnly) { @@ -1210,41 +1203,41 @@ function addProperties(model, Class, classId) { this.id(), this.constructor.name, propertyName - ); + ) } else { if ($metamodel.isValidType(value, propertyType)) { - search = $db[classId].find({ + search = $db.collections[classId].find({ _id: this.id(), - }); + }) if (search.length) { - component = search[0]; + component = search[0] if ($history.isEnabled()) { - oldValue = JSON.stringify(component[propertyName]); + oldValue = JSON.stringify(component[propertyName]) } switch (true) { case $metamodel.isClassName(propertyType): if (value === null) { - realVal = value; + realVal = value } else { - realVal = value.id(); + realVal = value.id() } - break; + break case propertyType === 'date': if (typeof value === 'string') { - realVal = value; + realVal = value } else { - realVal = value.toISOString(); - component[propertyName] = value.toISOString(); + realVal = value.toISOString() + component[propertyName] = value.toISOString() } - break; + break default: - realVal = value; - break; + realVal = value + break } - component[propertyName] = realVal; + component[propertyName] = realVal if ($history.isEnabled() && classId.indexOf('_') !== 0) { $history.pushState({ @@ -1254,7 +1247,7 @@ function addProperties(model, Class, classId) { field: propertyName, value: JSON.stringify(realVal), oldValue: oldValue, - }); + }) } if ($helper.isRuntime() && $helper.getRuntime().require('db')) { @@ -1263,19 +1256,19 @@ function addProperties(model, Class, classId) { id: this.id(), field: propertyName, value: realVal, - }); + }) } // case of _Behavior if (classId === '_Behavior') { - $behavior.removeFromMemory(this.id()); + $behavior.removeFromMemory(this.id()) } $workflow.process({ component: this.id(), state: propertyName, data: [value], - }); + }) } } else { $log.invalidPropertyName( @@ -1284,19 +1277,19 @@ function addProperties(model, Class, classId) { propertyName, value, propertyType - ); + ) } } } - }; + } Class.prototype[propertyName] = new Function( '__proxy', 'return function ' + propertyName + ' (value) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } - }); + }) } /** @@ -1312,53 +1305,53 @@ function addProperties(model, Class, classId) { * Some checks can be done in order to see if the set of properties is compliant with the model. */ function addStructure(path, name, model, id) { - var properties = getStructureProperties( + let properties = getStructureProperties( path ? path + '.' + name : name, model - ); - var sructure = undefined; + ) + let sructure = undefined if (getStructureValue(model, id, path ? path + '.' + name : name)) { - sructure = {}; + sructure = {} properties.forEach(function property(prop) { - var proxy = {}; - var propertyName = ''; - var propertyType = ''; - var propertyReadOnly = ''; + let proxy = {} + let propertyName = '' + let propertyType = '' + let propertyReadOnly = '' - propertyName = prop.name; - propertyType = prop.type; - propertyReadOnly = prop.readOnly; + propertyName = prop.name + propertyType = prop.type + propertyReadOnly = prop.readOnly if (Array.isArray(propertyType) || propertyType === 'array') { // in case of array, return a sub array proxy = function proxy(position, value) { - var search = []; - var component = null; - var runtimeArr = null; - var val = null; - var parentPath = ''; - var fullPath = ''; - var oldValue = null; + let search = [] + let component = null + let runtimeArr = null + let val = null + let parentPath = '' + let fullPath = '' + let oldValue = null function _isValidCollection(coll, type) { - var result = true; + let result = true coll.forEach(function (val) { if (!$metamodel.isValidType(val, type)) { - result = result && false; + result = result && false } - }); + }) - return result; + return result } if (path) { - parentPath = path + '.' + name; + parentPath = path + '.' + name } else { - parentPath = name; + parentPath = name } - fullPath = parentPath + '.' + propertyName; + fullPath = parentPath + '.' + propertyName if (typeof value === 'undefined') { if (typeof position === 'undefined') { @@ -1369,9 +1362,9 @@ function addStructure(path, name, model, id) { classId: model, type: Array.isArray(propertyType) ? propertyType[0] : 'any', arr: getStructureValue(model, id, fullPath), - }); + }) - return runtimeArr; + return runtimeArr } else { if (Array.isArray(position)) { // we replace the collection @@ -1381,15 +1374,15 @@ function addStructure(path, name, model, id) { Array.isArray(propertyType) ? propertyType[0] : 'any' ) ) { - search = $db[model].find({ + search = $db.collections[model].find({ _id: id, - }); + }) if (search.length) { if ($history.isEnabled()) { - oldValue = getStructureValue(model, id, fullPath); + oldValue = getStructureValue(model, id, fullPath) } - setStructureValue(model, id, fullPath, position); + setStructureValue(model, id, fullPath, position) // all element if (fullPath.indexOf('[') !== -1) { @@ -1397,7 +1390,7 @@ function addStructure(path, name, model, id) { component: id, state: fullPath.replace(/\[(\d)*\]/g, ''), data: [position, 'reset'], - }); + }) } // current element @@ -1405,7 +1398,7 @@ function addStructure(path, name, model, id) { component: id, state: fullPath, data: [position, 'reset'], - }); + }) if ($history.isEnabled() && model.indexOf('_') !== 0) { $history.pushState({ @@ -1415,7 +1408,7 @@ function addStructure(path, name, model, id) { field: fullPath, value: JSON.stringify([]), oldValue: JSON.stringify(oldValue), - }); + }) } if ($helper.isRuntime()) { @@ -1424,7 +1417,7 @@ function addStructure(path, name, model, id) { id: id, field: fullPath, value: position, - }); + }) } } } else { @@ -1434,25 +1427,24 @@ function addStructure(path, name, model, id) { propertyName, position, propertyType[0] - ); + ) } } else { if (typeof position === 'number') { - component = $db.store[model][id]; + component = $db.store[model][id] if (component) { switch (true) { case $metamodel.isClassName( Array.isArray(propertyType) ? propertyType[0] : 'any' ): - val = exports.get( + val = get( getStructureValue( model, id, fullPath + '[' + position + ']' ) - ); - return val; - break; + ) + return val case Array.isArray(propertyType) ? propertyType[0] : 'any' === 'date': @@ -1462,9 +1454,8 @@ function addStructure(path, name, model, id) { id, fullPath + '[' + position + ']' ) - ); - return val; - break; + ) + return val case Array.isArray(propertyType) ? propertyType[0] : 'any' === 'json': @@ -1472,33 +1463,30 @@ function addStructure(path, name, model, id) { model, id, fullPath + '[' + position + ']' - ); - val = JSON.parse(JSON.stringify(val)); - return val; - break; + ) + val = JSON.parse(JSON.stringify(val)) + return val case $metamodel.isStructure(fullPath, model): val = addStructure( parentPath, propertyName + '[' + position + ']', model, id - ); - return val; - break; + ) + return val default: val = getStructureValue( model, id, fullPath + '[' + position + ']' - ); - return val; - break; + ) + return val } } else { $log.destroyedComponentCall( fullPath[position] + '[' + position + ']', id - ); + ) } } else { $log.invalidPropertyName( @@ -1507,13 +1495,13 @@ function addStructure(path, name, model, id) { propertyName, position, 'number' - ); + ) } } } } else { if (propertyReadOnly) { - $log.readOnlyProperty(id, this.constructor.name, propertyName); + $log.readOnlyProperty(id, this.constructor.name, propertyName) } else { if ( $metamodel.isValidType( @@ -1521,13 +1509,13 @@ function addStructure(path, name, model, id) { Array.isArray(propertyType) ? propertyType[0] : 'any' ) ) { - search = $db[model].find({ + search = $db.collections[model].find({ _id: id, - }); + }) if (search.length) { - var arr = getStructureValue(model, id, fullPath); + let arr = getStructureValue(model, id, fullPath) if (typeof arr === 'undefined') { - arr = []; + arr = [] } switch (true) { @@ -1538,23 +1526,23 @@ function addStructure(path, name, model, id) { $metamodel.isClassName( Array.isArray(propertyType) ? propertyType[0] : 'any' ): - arr[position] = value.id(); - break; + arr[position] = value.id() + break case Array.isArray(propertyType) ? propertyType[0] : 'any' === 'date': - arr[position] = value.toISOString(); - break; + arr[position] = value.toISOString() + break default: - arr[position] = value; - break; + arr[position] = value + break } if ($history.isEnabled()) { - oldValue = getStructureValue(model, id, fullPath); + oldValue = getStructureValue(model, id, fullPath) } - setStructureValue(model, id, fullPath, arr); + setStructureValue(model, id, fullPath, arr) if ($history.isEnabled() && model.indexOf('_') !== 0) { $history.pushState({ @@ -1564,7 +1552,7 @@ function addStructure(path, name, model, id) { field: fullPath, value: JSON.stringify(value), oldValue: JSON.stringify(oldValue), - }); + }) } if ($helper.isRuntime()) { @@ -1573,7 +1561,7 @@ function addStructure(path, name, model, id) { id: id, field: fullPath, value: arr, - }); + }) } // all element @@ -1582,7 +1570,7 @@ function addStructure(path, name, model, id) { component: id, state: fullPath.replace(/\[(\d)*\]/g, ''), data: [value, 'add'], - }); + }) } // current element @@ -1590,7 +1578,7 @@ function addStructure(path, name, model, id) { component: id, state: fullPath, data: [value, 'add'], - }); + }) } } else { $log.invalidPropertyName( @@ -1599,100 +1587,98 @@ function addStructure(path, name, model, id) { propertyName, value, Array.isArray(propertyType) ? propertyType[0] : 'any' - ); + ) } } } - }; + } sructure[propertyName] = new Function( '__proxy', 'return function ' + propertyName + ' (position, value) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } else { proxy = function proxy(value) { - var search = []; - var component = null; - var propertyValue = null; - var parentPath = ''; - var fullPath = ''; - var oldValue = null; - var realVal = null; + let search = [] + let component = null + let propertyValue = null + let parentPath = '' + let fullPath = '' + let oldValue = null + let realVal = null if (path) { - parentPath = path + '.' + name; + parentPath = path + '.' + name } else { - parentPath = name; + parentPath = name } - fullPath = parentPath + '.' + propertyName; + fullPath = parentPath + '.' + propertyName if (typeof value === 'undefined') { - component = $db.store[model][id]; + component = $db.store[model][id] if (component) { switch (true) { case $metamodel.isClassName(propertyType): - propertyValue = exports.get( - getStructureValue(model, id, fullPath) - ); - break; + propertyValue = get(getStructureValue(model, id, fullPath)) + break case propertyType === 'date': propertyValue = new Date( getStructureValue(model, id, fullPath) - ); - break; + ) + break case propertyType === 'json': - propertyValue = getStructureValue(model, id, fullPath); - propertyValue = JSON.parse(JSON.stringify(propertyValue)); - break; + propertyValue = getStructureValue(model, id, fullPath) + propertyValue = JSON.parse(JSON.stringify(propertyValue)) + break case $metamodel.isStructure(fullPath, model): propertyValue = addStructure( parentPath, propertyName, model, id - ); - break; + ) + break default: - propertyValue = getStructureValue(model, id, fullPath); - break; + propertyValue = getStructureValue(model, id, fullPath) + break } if (propertyValue === undefined && prop.default !== undefined) { - propertyValue = prop.default; + propertyValue = prop.default } - return propertyValue; + return propertyValue } else { - $log.destroyedComponentCall(fullPath, id); + $log.destroyedComponentCall(fullPath, id) } } else { if (propertyReadOnly) { - $log.readOnlyProperty(id, model, fullPath); + $log.readOnlyProperty(id, model, fullPath) } else { if ($metamodel.isValidType(value, propertyType)) { - search = $db[model].find({ + search = $db.collections[model].find({ _id: id, - }); + }) if (search.length) { - component = search[0]; + component = search[0] if ($history.isEnabled()) { - oldValue = getStructureValue(model, id, fullPath); + oldValue = getStructureValue(model, id, fullPath) } switch (true) { case $metamodel.isClassName(propertyType): - realVal = value.id(); - break; + realVal = value.id() + break case propertyType === 'date': - realVal = value.toISOString(); - break; + realVal = value.toISOString() + break default: - realVal = value; - break; + realVal = value + break } - setStructureValue(model, id, fullPath, realVal); + setStructureValue(model, id, fullPath, realVal) if ($history.isEnabled() && model.indexOf('_') !== 0) { $history.pushState({ @@ -1702,7 +1688,7 @@ function addStructure(path, name, model, id) { field: fullPath, value: JSON.stringify(realVal), oldValue: JSON.stringify(oldValue), - }); + }) } if ( @@ -1714,12 +1700,12 @@ function addStructure(path, name, model, id) { id: id, field: fullPath, value: realVal, - }); + }) } // case of _Behavior if (model === '_Behavior') { - $behavior.removeFromMemory(id); + $behavior.removeFromMemory(id) } // all elements @@ -1728,7 +1714,7 @@ function addStructure(path, name, model, id) { component: id, state: fullPath.replace(/\[(\d)*\]/g, ''), data: [value], - }); + }) } // the current element @@ -1736,7 +1722,7 @@ function addStructure(path, name, model, id) { component: id, state: fullPath, data: [value], - }); + }) } } else { $log.invalidPropertyName( @@ -1745,23 +1731,23 @@ function addStructure(path, name, model, id) { fullPath, value, propertyType - ); + ) } } } - }; + } sructure[propertyName] = new Function( '__proxy', 'return function ' + propertyName + ' (value) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } - }); + }) } - return sructure; + return sructure } /** @@ -1774,30 +1760,30 @@ function addStructure(path, name, model, id) { * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model. */ function addMethods(model, Class, classId) { - var methods = getMethods(model); + let methods = getMethods(model) methods.forEach(function method(methodName) { - var paramsName = getParamNames(classId, methodName); - var params = paramsName.join(', '); - var paramsWithContext = ''; + let paramsName = getParamNames(classId, methodName) + let params = paramsName.join(', ') + let paramsWithContext = '' - var proxy = function proxy() { - var result = null; + let proxy = function proxy() { + let result = null result = $workflow.process({ component: this.id(), state: methodName, data: arguments, - }); + }) - return result; - }; + return result + } - var proxyWithContext = function proxy() { - var result = null; - var data = Array.prototype.slice.call(arguments); + let proxyWithContext = function proxy() { + let result = null + let data = Array.prototype.slice.call(arguments) - data.shift(); + data.shift() if (arguments[0]) { result = $workflow.process({ @@ -1805,17 +1791,17 @@ function addMethods(model, Class, classId) { state: methodName, data: data, context: arguments[0], - }); + }) } else { - $log.unknownContext(classId, methodName); + $log.unknownContext(classId, methodName) } - return result; - }; + return result + } if (params) { - paramsName.unshift('context'); - paramsWithContext = paramsName.join(', '); + paramsName.unshift('context') + paramsWithContext = paramsName.join(', ') Class.prototype[methodName] = new Function( '__proxy', @@ -1824,7 +1810,7 @@ function addMethods(model, Class, classId) { ' (' + params + ') { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) if (methodName !== 'name') { Class[methodName] = new Function( '__proxy', @@ -1833,23 +1819,23 @@ function addMethods(model, Class, classId) { ' (' + paramsWithContext + ') { return __proxy.apply(this, arguments) };' - )(proxyWithContext); + )(proxyWithContext) } } else { Class.prototype[methodName] = new Function( '__proxy', 'return function ' + methodName + ' () { return __proxy.apply(this) };' - )(proxy); + )(proxy) if (methodName !== 'name') { Class[methodName] = new Function( '__proxy', 'return function ' + methodName + ' (context) { return __proxy.apply(this, arguments) };' - )(proxyWithContext); + )(proxyWithContext) } } - }); + }) } /** @@ -1862,36 +1848,36 @@ function addMethods(model, Class, classId) { * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model. */ function addEvents(model, Class, classId) { - var events = getEvents(model); + let events = getEvents(model) events.forEach(function event(methodName) { - var paramsName = getParamNames(classId, methodName); - var params = paramsName.join(', '); + let paramsName = getParamNames(classId, methodName) + let params = paramsName.join(', ') - var proxy = function proxy() { - var systems = []; - var systemId = 'e89c617b6b15d24'; - var data = []; - var i = 0; - var length = -1; - var message = {}; + let proxy = function proxy() { + let systems = [] + let systemId = 'e89c617b6b15d24' + let data = [] + let i = 0 + let length = -1 + let message = {} if (classId === '_Channel') { - systems = $db._System.find({ + systems = $db.collections._System.find({ master: true, - }); + }) if (systems.length) { - systemId = systems[0][$mson.ID]; + systemId = systems[0][$mson.ID] } - message.from = systemId; - length = arguments.length; + message.from = systemId + length = arguments.length for (i = 0; i < length; i++) { - data.push(arguments[i]); + data.push(arguments[i]) } - message.data = data; - message.event = methodName; + message.data = data + message.event = methodName - $db._Message.insert(message); + $db.collections._Message.insert(message) $workflow.process({ component: this.id(), @@ -1903,15 +1889,15 @@ function addEvents(model, Class, classId) { data: message.data, }, ], - }); + }) } else { $workflow.process({ component: this.id(), state: methodName, data: arguments, - }); + }) } - }; + } if (params) { Class.prototype[methodName] = new Function( '__proxy', @@ -1920,14 +1906,14 @@ function addEvents(model, Class, classId) { ' (' + params + ') { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } else { Class.prototype[methodName] = new Function( '__proxy', 'return function ' + methodName + ' () { return __proxy.apply(this) };' - )(proxy); + )(proxy) } - }); + }) } /** @@ -1938,10 +1924,10 @@ function addEvents(model, Class, classId) { * @description Add a on method to a component to add behaviors to the component */ function addOn(Class, classId) { - var proxy = function proxy(state, action, useCoreAPI, isCore) { - var behaviorId = ''; - var currentState = ''; - var context = null; + let proxy = function proxy(state, action, useCoreAPI, isCore) { + let behaviorId = '' + let currentState = '' + let context = null // case of context if ( @@ -1949,9 +1935,9 @@ function addOn(Class, classId) { useCoreAPI.constructor && useCoreAPI.constructor.name !== 'Boolean' ) { - context = useCoreAPI; - useCoreAPI = false; - isCore = true; + context = useCoreAPI + useCoreAPI = false + isCore = true } if ( @@ -1967,12 +1953,12 @@ function addOn(Class, classId) { !$metamodel.isProperty(state, classId) && !$metamodel.isLink(state, classId) && !$metamodel.isCollection(state, classId) && - $db._Behavior.find({ + $db.collections._Behavior.find({ component: this.id(), state: state, }).length >= 1 ) { - $log.behaviorNotUnique(classId, state); + $log.behaviorNotUnique(classId, state) } else { if ($workflow.checkInputNumbers(classId, state, action)) { behaviorId = $behavior.add( @@ -1982,33 +1968,33 @@ function addOn(Class, classId) { useCoreAPI, isCore, context - ); + ) - currentState = $state.get(this.id()); + currentState = $state.get(this.id()) if (currentState && currentState.state === state) { $workflow.process({ id: behaviorId, data: currentState.value, - }); + }) } } else { $log.invalidParamNumberMethodOn( this.id(), this.constructor.name, state - ); + ) } } } else { - $log.invalidStateOn(classId, state); + $log.invalidStateOn(classId, state) } } - return behaviorId; - }; + return behaviorId + } Class.prototype.on = new Function( '__proxy', 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } /** @@ -2019,10 +2005,10 @@ function addOn(Class, classId) { * @description Add a on method to a class component to add behaviors to the class */ function addOnClass(Class, classId) { - var proxy = function proxy(state, action, useCoreAPI, isCore) { - var behaviorId = ''; - var currentState = ''; - var context = null; + let proxy = function proxy(state, action, useCoreAPI, isCore) { + let behaviorId = '' + let currentState = '' + let context = null // case of context if ( @@ -2030,9 +2016,9 @@ function addOnClass(Class, classId) { useCoreAPI.constructor && useCoreAPI.constructor.name !== 'Boolean' ) { - context = useCoreAPI; - useCoreAPI = false; - isCore = true; + context = useCoreAPI + useCoreAPI = false + isCore = true } if ( $workflow.checkInput({ @@ -2047,12 +2033,12 @@ function addOnClass(Class, classId) { !$metamodel.isProperty(state, classId) && !$metamodel.isLink(state, classId) && !$metamodel.isCollection(state, classId) && - $db._Behavior.find({ + $db.collections._Behavior.find({ component: this.id(), state: state, }).length >= 1 ) { - $log.behaviorNotUnique(classId, state); + $log.behaviorNotUnique(classId, state) } else { if ($workflow.checkInputNumbers(classId, state, action)) { behaviorId = $behavior.add( @@ -2062,33 +2048,33 @@ function addOnClass(Class, classId) { useCoreAPI, isCore, context - ); + ) - currentState = $state.get(this.id()); + currentState = $state.get(this.id()) if (currentState && currentState.state === state) { $workflow.process({ id: behaviorId, data: currentState.value, - }); + }) } } else { $log.invalidParamNumberMethodOn( this.id(), this.constructor.name, state - ); + ) } } } else { - $log.invalidStateOn(classId, state); + $log.invalidStateOn(classId, state) } } - return behaviorId; - }; + return behaviorId + } Class.on = new Function( '__proxy', 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } /** @@ -2099,7 +2085,7 @@ function addOnClass(Class, classId) { * @description Add a off method to a class component to remove behaviors from the class */ function addOffClass(Class, classId) { - var proxy = function proxy(state, behaviorId) { + let proxy = function proxy(state, behaviorId) { if ( $workflow.checkInput({ component: this, @@ -2112,16 +2098,16 @@ function addOffClass(Class, classId) { behaviorId: behaviorId, componentId: classId, state: state, - }); + }) } else { - $log.invalidStateOff(classId, state); + $log.invalidStateOff(classId, state) } } - }; + } Class.off = new Function( '__proxy', 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } /** @@ -2131,41 +2117,41 @@ function addOffClass(Class, classId) { * @description Add a destroy method to a class component to detroy the class and all the components of the same class */ function addDestroyClass(Class) { - var proxy = function proxy() { - var id = this.id(); - var result = []; - var i = 0; - var length = 0; + let proxy = function proxy() { + let id = this.id() + let result = [] + let i = 0 + let length = 0 // if not virtual component - if ($db[id]) { - result = $db[id].remove(); + if ($db.collections[id]) { + result = $db.collections[id].remove() } - delete store[id]; + delete store[id] // remove behaviors $behavior.remove({ componentId: id, - }); + }) - length = result.length; + length = result.length for (i = 0; i < length; i++) { // remove behaviors $behavior.remove({ componentId: result[i], - }); + }) } $workflow.process({ component: id, state: 'destroy', - }); - }; + }) + } Class.destroy = new Function( '__proxy', 'return function destroy () { return __proxy.apply(this) };' - )(proxy); + )(proxy) } /** @@ -2175,13 +2161,13 @@ function addDestroyClass(Class) { * @description Require a component */ function addRequireClass(Class) { - var proxy = function proxy(id) { - return exports.get(id); - }; + let proxy = function proxy(id) { + return get(id) + } Class.require = new Function( '__proxy', 'return function require (id) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } /** @@ -2191,11 +2177,11 @@ function addRequireClass(Class) { * @description Init a class */ function addInitClass(Class) { - var proxy = function proxy() {}; + let proxy = function proxy() {} Class.init = new Function( '__proxy', 'return function init (conf) { return __proxy.apply(this, arguments) };' - )(proxy); + )(proxy) } /** @@ -2206,42 +2192,42 @@ function addInitClass(Class) { * @description Create a component from its configuration */ function factory(config) { - config = config || {}; + config = config || {} - var Class = {}; - var classId = ''; + let Class = {} + let classId = '' if (typeof config.model === 'undefined') { - classId = $helper.generateId(); + classId = $helper.generateId() } else { - classId = config.model; + classId = config.model } - Class = createClass(classId); + Class = createClass(classId) - store[classId] = Class; + store[classId] = Class - addIdClass(Class, classId); + addIdClass(Class, classId) - addProperties(config.model, Class, classId); - addMethods(config.model, Class, classId); - addEvents(config.model, Class, classId); + addProperties(config.model, Class, classId) + addMethods(config.model, Class, classId) + addEvents(config.model, Class, classId) // add default properties/methods only if the component // inherit from _Component if ($metamodel.inheritFrom(classId, '_Component')) { - addOn(Class, classId); + addOn(Class, classId) - addOnClass(Class, classId); - addOffClass(Class, classId); - addRequireClass(Class); - addInitClass(Class); - addDestroyClass(Class); + addOnClass(Class, classId) + addOffClass(Class, classId) + addRequireClass(Class) + addInitClass(Class) + addDestroyClass(Class) } - Object.freeze(Class); + Object.freeze(Class) - return Class; + return Class } /* Public methods */ @@ -2252,9 +2238,9 @@ function factory(config) { * @returns {Component} component * @description Get a component by its id */ -exports.get = function get(id) { - return store[id]; -}; +function get(id) { + return store[id] +} /** * @method create @@ -2263,51 +2249,59 @@ exports.get = function get(id) { * @returns {Component} * @description Create a component from its configuration */ -exports.create = function create(config) { - return factory(config); -}; +function create(config) { + return factory(config) +} /** * @method destroy * @param {String} id id of the component to destroy * @description Destroy a component from its id */ -exports.destroy = function destroy(id) { - var component = store[id]; - var classId = ''; +function destroy(id) { + let component = store[id] + let classId = '' if (component) { - delete store[id]; - classId = component.constructor.name; - $db[classId].remove({ + delete store[id] + classId = component.constructor.name + $db.collections[classId].remove({ _id: id, - }); + }) // remove behaviors $behavior.remove({ componentId: id, - }); + }) // case of Behavior if (classId === '_Behavior') { - $behavior.removeFromMemory(id); + $behavior.removeFromMemory(id) } } -}; +} /** * @method removeFromMemory * @param {String} id id of the component * @description Remove a component with its id from the memory */ -exports.removeFromMemory = function removeFromMemory(id) { - delete store[id]; -}; +function removeFromMemory(id) { + delete store[id] +} /** * @method clear * @description Remove all the components store in the memory */ -exports.clear = function clear() { - store = {}; -}; +function clear() { + store = {} +} + +export default { + get, + create, + destroy, + removeFromMemory, + clear, +} diff --git a/src/db.js b/src/db.js index d71de66..4b56fdf 100644 --- a/src/db.js +++ b/src/db.js @@ -40,22 +40,20 @@ * - remove operation automatically destroy a component. */ -'use strict'; - -var $component = require('./component.js'); -var $metamodel = require('./metamodel.js'); -var $helper = require('./helper.js'); -var $log = require('./log.js'); -var $history = require('./history.js'); -var $behavior = require('./behavior.js'); -var $state = require('./state.js'); -var $workflow = require('./workflow.js'); -var $mson = require('./mson.js'); +import $component from './component.js' +import $metamodel from './metamodel.js' +import $helper from './helper.js' +import $log from './log.js' +import $history from './history.js' +import $behavior from './behavior.js' +import $state from './state.js' +import $workflow from './workflow.js' +import $mson from './mson.js' /* Private properties */ -var collections = []; -var internalDB = [ +let collectionNames = [] +let internalDB = [ '_Runtime', '_Schema', '_GeneratedSchema', @@ -70,8 +68,8 @@ var internalDB = [ '_Channel', '_Logger', '_History', -]; -var coreDb = [ +] +let coreDb = [ '_Schema', '_GeneratedSchema', '_Logger', @@ -79,7 +77,7 @@ var coreDb = [ '_GeneratedModel', '_Type', '_History', -]; +] /* Private methods */ @@ -94,86 +92,84 @@ var coreDb = [ * @description Dump the database */ function dump() { - var dbDump = {}; - var collectionName = ''; - var behaviorId = ''; - var typeId = ''; - var type = null; - var behavior = null; - var schema = null; - var model = null; - var collection = null; - var schemaId = ''; - var modelId = ''; - var length = 0; - var i = 0; - var id = ''; + let dbDump = {} + let collectionName = '' + let behaviorId = '' + let typeId = '' + let type = null + let behavior = null + let schema = null + let model = null + let collection = null + let schemaId = '' + let modelId = '' + let length = 0 + let i = 0 + let id = '' // schemas - dbDump.schemas = {}; - if (exports._Schema.count()) { - for (schemaId in exports.store._Schema) { - if (!exports.store._Schema[schemaId][$mson.CORE]) { - schema = JSON.parse(JSON.stringify(exports.store._Schema[schemaId])); - dbDump.schemas[schemaId] = schema; + dbDump.schemas = {} + if (collections._Schema.count()) { + for (schemaId in store._Schema) { + if (!store._Schema[schemaId][$mson.CORE]) { + schema = JSON.parse(JSON.stringify(store._Schema[schemaId])) + dbDump.schemas[schemaId] = schema } } } // models - dbDump.models = {}; - if (exports._Model.count()) { - for (modelId in exports.store._Model) { - if (!exports.store._Model[modelId][$mson.CORE]) { - model = JSON.parse(JSON.stringify(exports.store._Model[modelId])); - dbDump.models[modelId] = model; + dbDump.models = {} + if (collections._Model.count()) { + for (modelId in store._Model) { + if (!store._Model[modelId][$mson.CORE]) { + model = JSON.parse(JSON.stringify(store._Model[modelId])) + dbDump.models[modelId] = model } } } // types - dbDump.types = {}; - if (exports._Type.count()) { - for (typeId in exports.store._Type) { - if (!exports.store._Type[typeId].core) { - type = JSON.parse(JSON.stringify(exports.store._Type[typeId])); - dbDump.types[type.name] = type; + dbDump.types = {} + if (collections._Type.count()) { + for (typeId in store._Type) { + if (!store._Type[typeId].core) { + type = JSON.parse(JSON.stringify(store._Type[typeId])) + dbDump.types[type.name] = type } } } // behaviors - dbDump.behaviors = {}; - for (behaviorId in exports.store._Behavior) { - if (!exports.store._Behavior[behaviorId].core) { - behavior = JSON.parse( - JSON.stringify(exports.store._Behavior[behaviorId]) - ); - dbDump.behaviors[behaviorId] = behavior; + dbDump.behaviors = {} + for (behaviorId in store._Behavior) { + if (!store._Behavior[behaviorId].core) { + behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId])) + dbDump.behaviors[behaviorId] = behavior } } // components - dbDump.components = {}; - length = collections.length; + dbDump.components = {} + length = collectionNames.length for (i = 0; i < length; i++) { - collectionName = collections[i]; - if (exports[collectionName].count()) { - collection = JSON.parse(JSON.stringify(exports.store[collectionName])); + collectionName = collectionNames[i] + if (collections[collectionName].count()) { + collection = JSON.parse(JSON.stringify(store[collectionName])) for (id in collection) { if (collection[id][$mson.CORE]) { - delete collection[id]; + delete collection[id] } } if (Object.keys(collection).length) { - dbDump.components[collectionName] = collection; + dbDump.components[collectionName] = collection } } } - return dbDump; + return dbDump } /** @@ -182,7 +178,7 @@ function dump() { * @description Sub class to override sort method of Array Class */ function _Array() { - var arr = []; + let arr = [] /** * @method sort @@ -191,36 +187,36 @@ function _Array() { * @description Override sort method */ arr.sort = function sort(param) { - var field = ''; - var arrCopy = []; + let field = '' + let arrCopy = [] // copy arr.forEach(function (val) { - arrCopy.push(val); - }); + arrCopy.push(val) + }) if (param instanceof Function) { - arrCopy.sort(param); + arrCopy.sort(param) } else { - field = Object.keys(param)[0]; + field = Object.keys(param)[0] arrCopy.sort(function (docA, docB) { if (docA[field] < docB[field]) { - return param[field] === 1 ? -1 : 1; + return param[field] === 1 ? -1 : 1 } if (docA[field] > docB[field]) { - return param[field] === 1 ? 1 : -1; + return param[field] === 1 ? 1 : -1 } - return 0; - }); + return 0 + }) } - return arrCopy; - }; + return arrCopy + } - return arr; + return arr } -_Array.prototype = []; +_Array.prototype = [] /** * @method isValidWithSelectors @@ -232,77 +228,77 @@ _Array.prototype = []; * @description Test if the query used for the search is valid with the document */ function isValidWithSelectors(field, query, document) { - var result = true; - var selector = ''; + let result = true + let selector = '' search: for (selector in query) { switch (true) { case selector === '$eq': if (query[selector] instanceof RegExp) { if (document[field].toString().match(query[selector]) === null) { - result = false; - break search; + result = false + break search } } else { if (document[field] !== query[selector]) { - result = false; - break search; + result = false + break search } } - break; + break case selector === '$gt': if (document[field] <= query[selector]) { - result = false; - break search; + result = false + break search } - break; + break case selector === '$gte': if (document[field] < query[selector]) { - result = false; - break search; + result = false + break search } - break; + break case selector === '$lt': if (document[field] >= query[selector]) { - result = false; - break search; + result = false + break search } - break; + break case selector === '$lte': if (document[field] > query[selector]) { - result = false; - break search; + result = false + break search } - break; + break case selector === '$ne': if (document[field] === query[selector]) { - result = false; - break search; + result = false + break search } - break; + break case selector === '$in': if ( Array.isArray(query[selector]) && query[selector].indexOf(document[field]) === -1 ) { - result = false; - break search; + result = false + break search } - break; + break case selector === '$nin': if ( Array.isArray(query[selector]) && query[selector].indexOf(document[field]) !== -1 ) { - result = false; - break search; + result = false + break search } - break; + break default: - break; + break } } - return result; + return result } /** @@ -314,11 +310,11 @@ function isValidWithSelectors(field, query, document) { * @description Test if the query of search is valid with the document */ function isValid(query, document) { - var result = true; - var findInArray = false; - var field = ''; - var i = 0; - var length = 0; + let result = true + let findInArray = false + let field = '' + let i = 0 + let length = 0 search: for (field in query) { if (typeof document[field] !== 'undefined') { @@ -326,49 +322,49 @@ function isValid(query, document) { // regular expression case query[field] instanceof RegExp: if (Array.isArray(document[field]) && !Array.isArray(query[field])) { - length = document[field].length; + length = document[field].length for (i = 0; i < length; i++) { if (document[field][i].toString().match(query[field]) !== null) { - findInArray = true; - break search; + findInArray = true + break search } } - result = findInArray; + result = findInArray } else { if (document[field].toString().match(query[field]) === null) { - result = false; - break search; + result = false + break search } } - break; + break // query selectors case query[field] instanceof Object && !Array.isArray(query[field]): - result = isValidWithSelectors(field, query[field], document); - break; + result = isValidWithSelectors(field, query[field], document) + break // multiple query case Array.isArray(document[field]) && !Array.isArray(query[field]): if (document[field].indexOf(query[field]) === -1) { - result = false; - break search; + result = false + break search } - break; + break // simple query default: if (document[field] !== query[field]) { - result = false; - break search; + result = false + break search } - break; + break } } else { - result = false; - break; + result = false + break } } - return result; + return result } /** @@ -379,70 +375,70 @@ function isValid(query, document) { * @description Import system into the database */ function impSystem(importedSystem) { - var result = ''; - var collectionName = ''; - var componentId = ''; - var typeName = ''; - var schemaName = ''; - var modelName = ''; - var behaviorId = ''; - var systems = []; + let result = '' + let collectionName = '' + let componentId = '' + let typeName = '' + let schemaName = '' + let modelName = '' + let behaviorId = '' + let systems = [] if (importedSystem) { // add types for (typeName in importedSystem.types) { - $metamodel.type(importedSystem.types[typeName]); + $metamodel.type(importedSystem.types[typeName]) } // add schemas for (schemaName in importedSystem.schemas) { - $metamodel.schema(importedSystem.schemas[schemaName]); + $metamodel.schema(importedSystem.schemas[schemaName]) } // add models for (modelName in importedSystem.models) { - $metamodel.model(importedSystem.models[modelName]); + $metamodel.model(importedSystem.models[modelName]) } - $metamodel.create(); + $metamodel.create() // add behaviors for (behaviorId in importedSystem.behaviors) { - exports._Behavior.insert(importedSystem.behaviors[behaviorId]); + collections._Behavior.insert(importedSystem.behaviors[behaviorId]) } - $log.initDb(); + $log.initDb() // add components for (collectionName in importedSystem.components) { for (componentId in importedSystem.components[collectionName]) { - exports[collectionName].insert( + collections[collectionName].insert( importedSystem.components[collectionName][componentId] - ); + ) } } // reset info if already a master system - systems = exports._System.find({ + systems = collections._System.find({ master: true, - }); + }) if (systems.length) { if (systems[0][$mson.ID] === importedSystem[$mson.ID]) { - importedSystem.master = true; + importedSystem.master = true } else { if (importedSystem.master) { - systems[0].master = false; + systems[0].master = false } } } // insert the system in DB - exports._System.insert(importedSystem); + collections._System.insert(importedSystem) - result = importedSystem[$mson.ID]; + result = importedSystem[$mson.ID] } - return result; + return result } /** @@ -452,45 +448,45 @@ function impSystem(importedSystem) { * @description Export a system from the database */ function expSystem() { - var result = ''; - var collectionName = ''; - var systems = []; - var id = null; - var dbDump = null; - var mastersystem = null; - var exportedSystem = {}; + let result = '' + let collectionName = '' + let systems = [] + let id = null + let dbDump = null + let mastersystem = null + let exportedSystem = {} // get id of the master system - systems = exports._System.find({ + systems = collections._System.find({ master: true, - }); + }) if (systems.length) { - mastersystem = systems[0]; - id = mastersystem[$mson.ID]; + mastersystem = systems[0] + id = mastersystem[$mson.ID] // prop - exportedSystem[$mson.ID] = id; - exportedSystem.name = mastersystem.name; - exportedSystem.description = mastersystem.description; - exportedSystem.version = mastersystem.version; - exportedSystem.master = true; + exportedSystem[$mson.ID] = id + exportedSystem.name = mastersystem.name + exportedSystem.description = mastersystem.description + exportedSystem.version = mastersystem.version + exportedSystem.master = true // dump - dbDump = dump(); + dbDump = dump() for (collectionName in dbDump) { if (dbDump.hasOwnProperty(collectionName)) { - exportedSystem[collectionName] = dbDump[collectionName]; + exportedSystem[collectionName] = dbDump[collectionName] } } - result = JSON.stringify(exportedSystem); + result = JSON.stringify(exportedSystem) } else { - result = '{}'; - $log.masterSystemNotFound(); + result = '{}' + $log.masterSystemNotFound() } - return result; + return result } /** @@ -501,104 +497,104 @@ function expSystem() { * @description Export a sub-system */ function expSubsystem(params) { - var system = {}; - var result = []; - var defaultName = ''; - var i = 0; - var length = 0; - var schema = null; - var type = null; - var model = null; - var behavior = null; - var component = null; - var className = ''; + let system = {} + let result = [] + let defaultName = '' + let i = 0 + let length = 0 + let schema = null + let type = null + let model = null + let behavior = null + let component = null + let className = '' // default values - result = exports._System.find({ + result = collections._System.find({ master: true, - }); + }) if (result.length) { - defaultName = result[0].name; + defaultName = result[0].name } - system.name = params.name || 'sub_' + defaultName; - system.version = params.version || '0.0.1'; - system.description = params.description || ''; + system.name = params.name || 'sub_' + defaultName + system.version = params.version || '0.0.1' + system.description = params.description || '' // schemas - system.schemas = {}; + system.schemas = {} if (params.schemas) { - result = exports._Schema.find(params.schema); + result = collections._Schema.find(params.schema) - length = result.length; + length = result.length for (i = 0; i < length; i++) { - schema = result[i]; + schema = result[i] if (!schema[$mson.CORE]) { - system.schemas[schema[$mson.ID]] = schema; + system.schemas[schema[$mson.ID]] = schema } } } // models - system.models = {}; + system.models = {} if (params.models) { - result = exports._Model.find(params.models); + result = collections._Model.find(params.models) - length = result.length; + length = result.length for (i = 0; i < length; i++) { - model = result[i]; + model = result[i] if (!model[$mson.CORE]) { - system.models[model[$mson.ID]] = model; + system.models[model[$mson.ID]] = model } } } // types - system.types = {}; + system.types = {} if (params.types) { - result = exports._Type.find(params.types); + result = collections._Type.find(params.types) - length = result.length; + length = result.length for (i = 0; i < length; i++) { - type = result[i]; + type = result[i] if (!type[$mson.CORE]) { - system.types[type[$mson.ID]] = type; + system.types[type[$mson.ID]] = type } } } // behaviors - system.behaviors = {}; + system.behaviors = {} if (params.behaviors) { - behavior = exports._Behavior.find(params.behaviors); + behavior = collections._Behavior.find(params.behaviors) - length = result.length; + length = result.length for (i = 0; i < length; i++) { - behavior = result[i]; + behavior = result[i] if (!behavior.core) { - system.behaviors[behavior[$mson.ID]] = behavior; + system.behaviors[behavior[$mson.ID]] = behavior } } } // components - system.components = {}; + system.components = {} if (params.components) { for (className in params.components) { - if (exports[className]) { - system.components[className] = {}; + if (collections[className]) { + system.components[className] = {} - result = exports[className].find(params.components[className]); - length = result.length; + result = collections[className].find(params.components[className]) + length = result.length for (i = 0; i < length; i++) { - component = result[i]; - system.components[className][component[$mson.ID]] = component; + component = result[i] + system.components[className][component[$mson.ID]] = component } } } } - return JSON.stringify(system); + return JSON.stringify(system) } /* Public properties */ @@ -607,7 +603,13 @@ function expSubsystem(params) { * @property {JSON} store * @description System Runtime database store that lists all the collections */ -exports.store = {}; +const store = {} + +/** + * @property {JSON} store + * @description System Runtime database store that lists all the collections + */ +const collections = {} /* Public methods */ @@ -619,17 +621,17 @@ exports.store = {}; * Internal collections manage core objects of System Runtime (schema, type, ...). * Public collections manage components of the same class. */ -var DatabaseCollection = function DatabaseCollection(name) { +let DatabaseCollection = function DatabaseCollection(name) { if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) { - exports.store[name] = {}; - this.name = name; + store[name] = {} + this.name = name if (internalDB.indexOf(name) === -1) { - collections.push(name); + collectionNames.push(name) } } else { - $log.invalidCollectionName(name); + $log.invalidCollectionName(name) } -}; +} /** * @method find @@ -638,50 +640,50 @@ var DatabaseCollection = function DatabaseCollection(name) { * @description Find a document into the collection * * @example - * $db.Person.find({'name': 'laure'}); - * $db.Person.find({'name': 'laure', 'age' : 24}); - * $db.Person.find([{'name': 'rene'}, {'name': 'robert'}]); + * $db.collections.Person.find({'name': 'laure'}); + * $db.collections.Person.find({'name': 'laure', 'age' : 24}); + * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]); */ DatabaseCollection.prototype.find = function find(query) { - var result = new _Array(); - var resultId = {}; - var id = ''; - var document = {}; + let result = new _Array() + let resultId = {} + let id = '' + let document = {} - query = query || null; + query = query || null if (query && Object.keys(query).length) { if (Array.isArray(query)) { query.forEach( function multiSearch(criteria) { - for (id in exports.store[this.name]) { - document = exports.store[this.name][id]; + for (id in store[this.name]) { + document = store[this.name][id] if (isValid(criteria, document)) { if (typeof resultId[id] === 'undefined') { - result.push(document); - resultId[id] = true; + result.push(document) + resultId[id] = true } } } }.bind(this) - ); + ) } else { - for (id in exports.store[this.name]) { - document = exports.store[this.name][id]; + for (id in store[this.name]) { + document = store[this.name][id] if (isValid(query, document)) { - result.push(document); + result.push(document) } } } } else { - for (id in exports.store[this.name]) { - document = exports.store[this.name][id]; - result.push(document); + for (id in store[this.name]) { + document = store[this.name][id] + result.push(document) } } - return result; -}; + return result +} /** * @method insert @@ -693,33 +695,31 @@ DatabaseCollection.prototype.find = function find(query) { * Then, after inserting it, we create the component. * * @example - * $db.Person.insert({ + * $db.collections.Person.insert({ * 'name': 'bob', * 'firstName': 'Saint-Clar', * 'age': 43 * }); */ DatabaseCollection.prototype.insert = function insert(document) { - var doc = []; - var Component = null; - var result = []; + let doc = [] + let Component = null + let result = [] if (Array.isArray(document)) { - doc = document; + doc = document } else { - doc.push(document); + doc.push(document) } doc.forEach( function multiInsert(obj) { - var component = null; - var channels = []; - var channel = null; + let channels = [] switch (true) { case obj === null: - $log.invalidDocumentOnDbInsert(obj, this.name); - break; + $log.invalidDocumentOnDbInsert(obj, this.name) + break case this.name === '_Schema': case this.name === '_Logger': case this.name === '_Model': @@ -728,18 +728,18 @@ DatabaseCollection.prototype.insert = function insert(document) { case this.name === '_GeneratedSchema': case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)): if (typeof obj[$mson.ID] === 'undefined') { - obj[$mson.ID] = $helper.generateId(); + obj[$mson.ID] = $helper.generateId() } - $metamodel.prepareObject(obj, $metamodel.getModel(this.name)); + $metamodel.prepareObject(obj, $metamodel.getModel(this.name)) - exports.store[this.name][obj[$mson.ID]] = obj; + store[this.name][obj[$mson.ID]] = obj - result.push(obj[$mson.ID]); + result.push(obj[$mson.ID]) - Component = $component.get(this.name); + Component = $component.get(this.name) if (Component) { - component = new Component(obj); + new Component(obj) } else { if ($history.isEnabled() && this.name.indexOf('_') !== 0) { $history.pushState({ @@ -747,42 +747,42 @@ DatabaseCollection.prototype.insert = function insert(document) { collection: this.name, id: obj[$mson.ID], value: JSON.stringify(obj), - }); + }) } if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').insert({ collection: this.name, document: obj, - }); + }) } } if (this.name === '_Message') { if ($helper.isRuntime()) { - channels = exports._Channel.find({}); - var length = channels.length; - for (var i = 0; i < length; i++) { - channel = $helper.getRuntime().require(channels[i][$mson.ID]); + channels = collections._Channel.find({}) + let length = channels.length + for (let i = 0; i < length; i++) { + $helper.getRuntime().require(channels[i][$mson.ID]) $workflow.process({ component: channels[i][$mson.ID], state: obj.event, data: obj.data, - }); + }) } } } - break; + break default: - $log.invalidDocumentOnDbInsert(obj, this.name); - break; + $log.invalidDocumentOnDbInsert(obj, this.name) + break } }.bind(this) - ); + ) - return result; -}; + return result +} /** * @method update @@ -794,34 +794,34 @@ DatabaseCollection.prototype.insert = function insert(document) { * @description Update documents into a collection * * @example - * $db.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}); - * $db.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'}); - * $db.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true}); + * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}); + * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'}); + * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true}); */ DatabaseCollection.prototype.update = function update(query, update, options) { - var docs = this.find(query); - var result = []; - var i = 0; - var length = docs.length; - var attributeName = ''; - var schema = $metamodel.getModel(this.name); - var type = ''; - var createdDocumentId = []; - - options = options || {}; + let docs = this.find(query) + let result = [] + let i = 0 + let length = docs.length + let attributeName = '' + let schema = $metamodel.getModel(this.name) + let type = '' + let createdDocumentId = [] + + options = options || {} if (typeof options.upsert === 'undefined') { - options.upsert = options.upsert || false; + options.upsert = options.upsert || false } if (update) { // upsert case if (length === 0 && options.upsert) { if (query[$mson.ID]) { - update[$mson.ID] = query[$mson.ID]; + update[$mson.ID] = query[$mson.ID] } - createdDocumentId = this.insert(update); + createdDocumentId = this.insert(update) if (createdDocumentId.length === 1) { - result.push(createdDocumentId[0]); + result.push(createdDocumentId[0]) } } @@ -835,7 +835,7 @@ DatabaseCollection.prototype.update = function update(query, update, options) { docs[i][$mson.ID], update[$mson.ID], typeof $component.get(update[$mson.ID]) !== 'undefined' - ); + ) } for (attributeName in update) { @@ -847,16 +847,16 @@ DatabaseCollection.prototype.update = function update(query, update, options) { this.name !== '_GeneratedModel' ) { // check type - type = ''; + type = '' if (attributeName.indexOf('_') !== 0) { if (attributeName.indexOf('.') !== -1) { - type = $metamodel.getModelPathType(this.name, attributeName); + type = $metamodel.getModelPathType(this.name, attributeName) } else { - type = schema[attributeName].type; + type = schema[attributeName].type } } else { if ($mson.SCHEMA_DEFINITION[attributeName]) { - type = $mson.SCHEMA_DEFINITION[attributeName].type; + type = $mson.SCHEMA_DEFINITION[attributeName].type } } if (type) { @@ -869,12 +869,12 @@ DatabaseCollection.prototype.update = function update(query, update, options) { field: attributeName, value: JSON.stringify(update[attributeName]), oldValue: JSON.stringify(docs[i][attributeName]), - }); + }) } - docs[i][attributeName] = update[attributeName]; + docs[i][attributeName] = update[attributeName] - result.push(docs[i][$mson.ID]); + result.push(docs[i][$mson.ID]) if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').update({ @@ -882,20 +882,20 @@ DatabaseCollection.prototype.update = function update(query, update, options) { id: docs[i][$mson.ID], field: attributeName, value: update[attributeName], - }); + }) } if (type === 'array') { $workflow.process({ component: docs[i][$mson.ID], state: attributeName, data: [update[attributeName], 'reset'], - }); + }) } else { $workflow.process({ component: docs[i][$mson.ID], state: attributeName, data: [update[attributeName]], - }); + }) } } else { $log.invalidPropertyTypeOnDbUpdate( @@ -904,14 +904,14 @@ DatabaseCollection.prototype.update = function update(query, update, options) { attributeName, update[attributeName], type - ); + ) } } else { $log.unknownPropertyOnDbUpdate( this.name, attributeName, docs[i][$mson.ID] - ); + ) } } else { // TODO more check in case of schema update @@ -923,12 +923,12 @@ DatabaseCollection.prototype.update = function update(query, update, options) { field: attributeName, value: JSON.stringify(update[attributeName]), oldValue: JSON.stringify(docs[i][attributeName]), - }); + }) } - docs[i][attributeName] = update[attributeName]; + docs[i][attributeName] = update[attributeName] - result.push(docs[i][$mson.ID]); + result.push(docs[i][$mson.ID]) if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').update({ @@ -936,7 +936,7 @@ DatabaseCollection.prototype.update = function update(query, update, options) { id: docs[i][$mson.ID], field: attributeName, value: update[attributeName], - }); + }) } } } @@ -944,8 +944,8 @@ DatabaseCollection.prototype.update = function update(query, update, options) { } } - return result; -}; + return result +} /** * @method remove @@ -955,23 +955,23 @@ DatabaseCollection.prototype.update = function update(query, update, options) { * When a document is removed, the component is destroyed. * * @example - * $db.Cars.remove({'code': 'AZD-71'}); - * $db.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]); + * $db.collections.Cars.remove({'code': 'AZD-71'}); + * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]); */ DatabaseCollection.prototype.remove = function remove(query) { - var result = []; - var id = ''; - var component = null; - var object = {}; + let result = [] + let id = '' + let component = null + let object = {} - query = query || null; + query = query || null if (query && Object.keys(query).length) { if (Array.isArray(query)) { query.forEach( function multiRemove(criteria) { - for (id in exports.store[this.name]) { - object = exports.store[this.name][id]; + for (id in store[this.name]) { + object = store[this.name][id] if (isValid(criteria, object)) { if ($history.isEnabled() && this.name.indexOf('_') !== 0) { @@ -979,31 +979,31 @@ DatabaseCollection.prototype.remove = function remove(query) { action: 'remove', collection: this.name, id: id, - oldValue: JSON.stringify(exports.store[this.name][id]), - }); + oldValue: JSON.stringify(store[this.name][id]), + }) } - delete exports.store[this.name][id]; + delete store[this.name][id] - result.push(id); + result.push(id) - component = $component.get(id); + component = $component.get(id) if (component) { - component.destroy(); + component.destroy() } if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').remove({ collection: this.name, id: id, - }); + }) } } } }.bind(this) - ); + ) } else { - for (id in exports.store[this.name]) { - object = exports.store[this.name][id]; + for (id in store[this.name]) { + object = store[this.name][id] if (isValid(query, object)) { if ($history.isEnabled() && this.name.indexOf('_') !== 0) { @@ -1011,58 +1011,58 @@ DatabaseCollection.prototype.remove = function remove(query) { action: 'remove', collection: this.name, id: id, - oldValue: JSON.stringify(exports.store[this.name][id]), - }); + oldValue: JSON.stringify(store[this.name][id]), + }) } - delete exports.store[this.name][id]; + delete store[this.name][id] - result.push(id); + result.push(id) - component = $component.get(id); + component = $component.get(id) if (component) { - component.destroy(); + component.destroy() } if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').remove({ collection: this.name, id: id, - }); + }) } } } } } else { - for (id in exports.store[this.name]) { + for (id in store[this.name]) { if ($history.isEnabled() && this.name.indexOf('_') !== 0) { $history.pushState({ action: 'remove', collection: this.name, id: id, - oldValue: JSON.stringify(exports.store[this.name][id]), - }); + oldValue: JSON.stringify(store[this.name][id]), + }) } - delete exports.store[this.name][id]; + delete store[this.name][id] if (coreDb.indexOf(this.name) === -1) { - component = $component.get(id); + component = $component.get(id) if (component) { - component.destroy(); + component.destroy() } } if ($helper.isRuntime() && $helper.getRuntime().require('db')) { $helper.getRuntime().require('db').remove({ collection: this.name, id: id, - }); + }) } - result.push(id); + result.push(id) } } - return result; -}; + return result +} /** * @method count @@ -1070,14 +1070,8 @@ DatabaseCollection.prototype.remove = function remove(query) { * @description Count the number of documents in the collection */ DatabaseCollection.prototype.count = function count() { - var result = 0; - var objectId = ''; - - for (objectId in exports.store[this.name]) { - result++; - } - return result; -}; + return store[this.name] ? Object.keys(store[this.name]).length : 0 +} /* Public methods */ @@ -1086,9 +1080,9 @@ DatabaseCollection.prototype.count = function count() { * @param {String} name of the collection * @description Create a new DatabaseCollection */ -exports.collection = function collection(name) { - exports[name] = new DatabaseCollection(name); -}; +function collection(name) { + collections[name] = new DatabaseCollection(name) +} /** * @method importSystem @@ -1096,9 +1090,9 @@ exports.collection = function collection(name) { * @returns {String} the id of the imported System Runtime system * @description Import a system into the database */ -exports.importSystem = function importSystem(importedSystem) { - return impSystem(importedSystem); -}; +function importSystem(importedSystem) { + return impSystem(importedSystem) +} /** * @method exportSystem @@ -1114,65 +1108,75 @@ exports.importSystem = function importSystem(importedSystem) { * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters */ -exports.exportSystem = function exportSystem(params) { - var result = ''; +function exportSystem(params) { + let result = '' if (params) { - result = expSubsystem(params); + result = expSubsystem(params) } else { - result = expSystem(); + result = expSystem() } - return result; -}; + return result +} /** * @method clear * @description Clear the database */ -exports.clear = function clear() { - var length = 0; - var i = 0; - var collectionName = ''; +function clear() { + let length = 0 + let i = 0 + let collectionName = '' // remove collections - length = collections.length; + length = collectionNames.length for (i = 0; i < length; i++) { - collectionName = collections[i]; - exports[collectionName].remove(); + collectionName = collectionNames[i] + collections[collectionName].remove() } // remove internal collections - length = internalDB.length; + length = internalDB.length for (i = 0; i < length; i++) { - collectionName = internalDB[i]; - exports[collectionName].remove(); + collectionName = internalDB[i] + collections[collectionName].remove() } -}; +} /** * @method init * @description Init the database */ -exports.init = function init() { - var runtimeSystemId = ''; - var runtimeSystem = null; +function init() { + let runtimeSystemId = '' + let runtimeSystem = null - runtimeSystem = exports._System.find({ + runtimeSystem = collections._System.find({ _id: 'e89c617b6b15d24', - })[0]; + })[0] // clear all the data in memory - exports.clear(); - $component.clear(); - $metamodel.clear(); - $state.clear(); - $behavior.clear(); - $history.clear(); + clear() + $component.clear() + $metamodel.clear() + $state.clear() + $behavior.clear() + $history.clear() // init metamodel - $metamodel.init(); + $metamodel.init() // reimport System Runtime core system - runtimeSystemId = exports.importSystem(runtimeSystem); - $component.get(runtimeSystemId).start(); -}; + runtimeSystemId = importSystem(runtimeSystem) + $component.get(runtimeSystemId).start() +} + +export default { + store, + collection, + collections, + importSystem, + exportSystem, + clear, + init, +} diff --git a/src/helper.js b/src/helper.js index 4f68c2d..e654d7e 100644 --- a/src/helper.js +++ b/src/helper.js @@ -26,16 +26,13 @@ * @description This module contains all the functions used by all the modules */ -'use strict'; - -var $db = require('./db.js'); -var $component = require('./component.js'); -var $mson = require('./mson.js'); +import $db from './db.js' +import $component from './component.js' +import $mson from './mson.js' /* Private property */ -var runtimeRef = null; -var requireRef = null; +let runtimeRef = null /* Public method */ @@ -44,104 +41,75 @@ var requireRef = null; * @returns {Boolean} true if a System Runtime instance exist * @description Check if a System Runtime instance exists */ -exports.isRuntime = function isRuntime() { - var result = false; +function isRuntime() { + let result = false - if ($db._Runtime && $db._Runtime.find().length) { - result = true; + if ($db.collections._Runtime && $db.collections._Runtime.find().length) { + result = true } - return result; -}; + return result +} /** * @method getRuntime * @returns {_Runtime} System Runtime instance * @description Get the System Runtime instance */ -exports.getRuntime = function getRuntime() { - var runtimeId = ''; - var search = $db._Runtime.find(); +function getRuntime() { + let runtimeId = '' + let search = $db.collections._Runtime.find() if (!runtimeRef && search[0]) { - runtimeId = search[0][$mson.ID]; - runtimeRef = $component.get(runtimeId); + runtimeId = search[0][$mson.ID] + runtimeRef = $component.get(runtimeId) } - return runtimeRef; -}; + return runtimeRef +} /** * @method isOnNode * @returns {Boolean} true if a System Runtime is running on node * @description Check if a System Runtime is running on node */ -exports.isOnNode = function isOnNode() { - var result = false; +function isOnNode() { + let result = false if (typeof window === 'undefined' && typeof global !== 'undefined') { - result = true; + result = true } - return result; -}; - -/** - * @method getRequire - * @returns {Object} the require object - * @description Get the require object - */ -exports.getRequire = function getRequire() { - if (!requireRef) { - // kludge for webpack - requireRef = eval('require'); - } - - return requireRef; -}; + return result +} /** * @method generateId * @returns {String} a uuid * @description Generate a uuid */ -exports.generateId = function generateId() { +function generateId() { // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript function gen() { return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - var r = (Math.random() * 16) | 0; - var v = c === 'x' ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); + let r = (Math.random() * 16) | 0 + let v = c === 'x' ? r : (r & 0x3) | 0x8 + return v.toString(16) + }) } // force the uuid to start with a letter function getPrefix() { - var validPrefix = 'abcdef'; - return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length)); + let validPrefix = 'abcdef' + return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length)) } - return getPrefix() + gen(); -}; + return getPrefix() + gen() +} -/** - * @method polyfill - * @description Add Polyfill - */ -exports.polyfill = function polyfill() { - // fixing constructor.name property in IE - // taken from http://stackoverflow.com/questions/25140723/constructor-name-is-undefined-in-internet-explorer - if ( - Function.prototype.name === undefined && - Object.defineProperty !== undefined - ) { - Object.defineProperty(Function.prototype, 'name', { - get: function get() { - var funcNameRegex = /function\s([^(]{1,})\(/; - var results = funcNameRegex.exec(this.toString()); - return results && results.length > 1 ? results[1].trim() : ''; - }, - set: function set(value) {}, - }); - } -}; +export default { + isRuntime, + getRuntime, + isOnNode, + generateId, +} diff --git a/src/history.js b/src/history.js index 82ead97..b73d1f4 100644 --- a/src/history.js +++ b/src/history.js @@ -25,16 +25,14 @@ * @description This module manages the history of all components lifecycle */ -'use strict'; - -var $db = require('./db.js'); -var $log = require('./log.js'); +import $db from './db.js' +import $log from './log.js' /* Private property */ -var stack = []; -var cursorIndex = -1; -var historizationEnabled = false; +let stack = [] +let cursorIndex = -1 +let historizationEnabled = false /* Public methods */ @@ -43,176 +41,172 @@ var historizationEnabled = false; * @returns {Boolean} true if the history is enabled * @description Is historization enabled */ -exports.isEnabled = function isEnabled() { - return historizationEnabled; -}; +function isEnabled() { + return historizationEnabled +} /** * @method start * @description start historization */ -exports.start = function start() { - historizationEnabled = true; -}; +function start() { + historizationEnabled = true +} /** * @method stop * @description stop historization */ -exports.stop = function stop() { - historizationEnabled = false; -}; +function stop() { + historizationEnabled = false +} /** * @method pushState * @param {Object} state new state * @description Add a state in the history */ -exports.pushState = function pushState(state) { - stack.push(state); -}; +function pushState(state) { + stack.push(state) +} /** * @method state * @returns {Object} current state * @description get Current state */ -exports.state = function state() { - return state[state.length - 1]; -}; +function state() { + return state[state.length - 1] +} /** * @method back * @returns {Integer} current cursor index * @description move backward into the history of state */ -exports.back = function back() { - var state = stack[cursorIndex]; - var update = {}; +function back() { + let state = stack[cursorIndex] + let update = {} if (state) { switch (state.action) { case 'insert': - $db[state.collection].remove({ + $db.collections[state.collection].remove({ _id: state.id, - }); - $log.historyDocumentRemoved(state.id, state.collection); - break; + }) + $log.historyDocumentRemoved(state.id, state.collection) + break case 'remove': - $db[state.collection].insert(JSON.parse(state.oldValue)); - $log.historyDocumentInserted( - state.id, - state.collection, - state.oldValue - ); - break; + $db.collections[state.collection].insert(JSON.parse(state.oldValue)) + $log.historyDocumentInserted(state.id, state.collection, state.oldValue) + break case 'update': - update[state.field] = JSON.parse(state.oldValue); + update[state.field] = JSON.parse(state.oldValue) - $db[state.collection].update( + $db.collections[state.collection].update( { _id: state.id, }, update - ); + ) $log.historyDocumentUpdated( state.id, state.collection, state.field, state.oldValue - ); - break; + ) + break default: - break; + break } - cursorIndex = cursorIndex - 1; + cursorIndex = cursorIndex - 1 } - return cursorIndex; -}; + return cursorIndex +} /** * @method forward * @returns {Integer} current cursor index * @description move forward into the history of state */ -exports.forward = function forward() { - cursorIndex = cursorIndex + 1; - var state = stack[cursorIndex]; - var update = {}; +function forward() { + cursorIndex = cursorIndex + 1 + let state = stack[cursorIndex] + let update = {} if (state) { switch (state.action) { case 'insert': - $db[state.collection].insert(JSON.parse(state.value)); - $log.historyDocumentInserted(state.id, state.collection, state.value); - break; + $db.collections[state.collection].insert(JSON.parse(state.value)) + $log.historyDocumentInserted(state.id, state.collection, state.value) + break case 'remove': - $db[state.collection].remove({ + $db.collections[state.collection].remove({ _id: state.id, - }); - $log.historyDocumentRemoved(state.id, state.collection); - break; + }) + $log.historyDocumentRemoved(state.id, state.collection) + break case 'update': - update[state.field] = JSON.parse(state.value); + update[state.field] = JSON.parse(state.value) - $db[state.collection].update( + $db.collections[state.collection].update( { _id: state.id, }, update - ); + ) $log.historyDocumentUpdated( state.id, state.collection, state.field, state.value - ); - break; + ) + break default: - break; + break } } - return cursorIndex; -}; + return cursorIndex +} /** * @method get * @param {} * @description Start back/forward from state */ -exports.get = function get(index) { - var result = null; +function get(index) { + let result = null if (index < 0) { - result = stack[stack.length + index]; + result = stack[stack.length + index] } else { - result = stack[index]; + result = stack[index] } - return result; -}; + return result +} /** * @method from * @param {Number} index index of the stack * @description Start back/forward from state */ -exports.from = function from(index) { +function from(index) { if (index === -1) { - cursorIndex = stack.length - 1; + cursorIndex = stack.length - 1 } else { - cursorIndex = index; + cursorIndex = index } -}; +} /** * @method dump * @returns {String} a dump of the history * @description Dump all the history */ -exports.dump = function dump() { +function dump() { return JSON.stringify({ stack: stack, - }); -}; + }) +} /** * @method load @@ -220,81 +214,96 @@ exports.dump = function dump() { * @returns {Boolean} true if the dump was loaded with no error * @description Load a dump of an history */ -exports.load = function load(dump) { - var noError = true; +function load(dump) { + let noError = true try { - var newStack = {}; - var update = {}; + let newStack = {} + let update = {} if (typeof dump === 'string') { - newStack = JSON.parse(dump).stack; + newStack = JSON.parse(dump).stack } else { - newStack = dump.stack; + newStack = dump.stack } newStack.forEach(function (state) { if (state) { switch (state.action) { case 'insert': - if ($db[state.collection]) { - $db[state.collection].insert(JSON.parse(state.value)); + if ($db.collections[state.collection]) { + $db.collections[state.collection].insert(JSON.parse(state.value)) $log.historyDocumentInserted( state.id, state.collection, state.value - ); + ) } else { - noError = false; + noError = false } - break; + break case 'remove': - if ($db[state.collection]) { - $db[state.collection].remove({ + if ($db.collections[state.collection]) { + $db.collections[state.collection].remove({ _id: state.id, - }); - $log.historyDocumentRemoved(state.id, state.collection); + }) + $log.historyDocumentRemoved(state.id, state.collection) } else { - noError = false; + noError = false } - break; + break case 'update': - if ($db[state.collection]) { - update[state.field] = JSON.parse(state.value); + if ($db.collections[state.collection]) { + update[state.field] = JSON.parse(state.value) - $db[state.collection].update( + $db.collections[state.collection].update( { _id: state.id, }, update - ); + ) $log.historyDocumentUpdated( state.id, state.collection, state.field, state.value - ); + ) } else { - noError = false; + noError = false } - break; + break default: - break; + break } } - }); + }) } catch (e) { - noError = false; + noError = false } - return noError; -}; + return noError +} /** * @method clear * @description Remove all the states from the memory */ -exports.clear = function clear() { - stack = []; -}; +function clear() { + stack = [] +} + +export default { + isEnabled, + start, + stop, + pushState, + state, + back, + forward, + get, + from, + dump, + load, + clear, +} diff --git a/src/log.js b/src/log.js index f0c6b2c..82bc765 100644 --- a/src/log.js +++ b/src/log.js @@ -27,33 +27,31 @@ * @description This module contains all the functions that write a log */ -'use strict'; - -var $metamodel = require('./metamodel.js'); -var $db = require('./db.js'); -var $component = require('./component.js'); -var $mson = require('./mson.js'); +import $metamodel from './metamodel.js' +import $db from './db.js' +import $component from './component.js' +import $mson from './mson.js' /* Private properties */ -var currentLevel = 'warn'; -var loggerRef = null; -var fakeLoggerRef = { +let currentLevel = 'warn' // eslint-disable-line no-unused-vars +let loggerRef = null +let fakeLoggerRef = { currentLevel: 'warn', level: function debug(levelName) { if (levelName) { - this.currentLevel = levelName; + this.currentLevel = levelName } - return this.currentLevel; + return this.currentLevel }, debug: function debug(message) { if (this.currentLevel === 'debug') { - console.log('runtime: ' + message); + console.log('runtime: ' + message) } }, info: function info(message) { if (this.currentLevel === 'info' || this.currentLevel === 'debug') { - console.info('runtime: ' + message); + console.info('runtime: ' + message) } }, warn: function warning(message) { @@ -62,7 +60,7 @@ var fakeLoggerRef = { this.currentLevel === 'warn' || this.currentLevel === 'debug' ) { - console.warn('runtime: ' + message); + console.warn('runtime: ' + message) } }, error: function error(message) { @@ -72,10 +70,10 @@ var fakeLoggerRef = { this.currentLevel === 'debug' || this.currentLevel === 'error' ) { - console.error('runtime: ' + message); + console.error('runtime: ' + message) } }, -}; +} /** * @method getLogger @@ -84,29 +82,29 @@ var fakeLoggerRef = { * @description Get the _Logger instance */ function getLogger() { - var loggerId = ''; - var loggers = []; - var result = null; + let loggerId = '' + let loggers = [] + let result = null if (!$metamodel.getModel('_Logger')) { - result = fakeLoggerRef; + result = fakeLoggerRef } else { - loggers = $db._Logger.find(); + loggers = $db.collections._Logger.find() if (loggers.length) { - loggerId = loggers[0][$mson.ID]; + loggerId = loggers[0][$mson.ID] if ($component.get(loggerId)) { - loggerRef = $component.get(loggerId); - result = loggerRef; + loggerRef = $component.get(loggerId) + result = loggerRef } else { - result = fakeLoggerRef; + result = fakeLoggerRef } } else { - result = fakeLoggerRef; + result = fakeLoggerRef } } - return result; + return result } /* Public methods */ @@ -116,9 +114,9 @@ function getLogger() { * @param {String} levelName name of the level * @description Set the level of the log */ -exports.level = function level(levelName) { - currentLevel = levelName; -}; +function level(levelName) { + currentLevel = levelName +} /** * @method unknownProperty @@ -126,8 +124,8 @@ exports.level = function level(levelName) { * @param {Object} schema the schema definition * @description A property of a schema is unknown */ -exports.unknownProperty = function unknownProperty(propertyName, schema) { - var message = ''; +function unknownProperty(propertyName, schema) { + let message = '' if (schema[$mson.NAME]) { message = @@ -135,13 +133,13 @@ exports.unknownProperty = function unknownProperty(propertyName, schema) { propertyName + "' for the definition of '" + schema[$mson.NAME] + - "'"; + "'" } else { - message = "unknown property '" + propertyName + "' for a model"; + message = "unknown property '" + propertyName + "' for a model" } - getLogger().warn(message); -}; + getLogger().warn(message) +} /** * @method invalidPropertyType @@ -150,15 +148,11 @@ exports.unknownProperty = function unknownProperty(propertyName, schema) { * @param {String} property the property * @description Invalid type for a property */ -exports.invalidPropertyType = function invalidPropertyType( - propertyName, - type, - property -) { - var realType = +function invalidPropertyType(propertyName, type, property) { + let realType = property && property.constructor ? property.constructor.name - : typeof property; + : typeof property getLogger().warn( "invalid value for property '" + propertyName + @@ -167,8 +161,8 @@ exports.invalidPropertyType = function invalidPropertyType( "' instead of type '" + realType + "'" - ); -}; + ) +} /** * @method invalidEnumValue @@ -176,11 +170,11 @@ exports.invalidPropertyType = function invalidPropertyType( * @param {String} type the type defined by the schema * @description Invalid value for type enum */ -exports.invalidEnumValue = function invalidEnumValue(value, type) { +function invalidEnumValue(value, type) { getLogger().warn( "'" + value + "' is an invalid value for the type enum '" + type + "'" - ); -}; + ) +} /** * @method invalidClassName @@ -189,11 +183,7 @@ exports.invalidEnumValue = function invalidEnumValue(value, type) { * @param {String} constructorName name of the component class * @description Invalid class name for a component */ -exports.invalidClassName = function invalidClassName( - componentId, - type, - constructorName -) { +function invalidClassName(componentId, type, constructorName) { getLogger().warn( "invalid component '" + componentId + @@ -202,26 +192,26 @@ exports.invalidClassName = function invalidClassName( "' instead of '" + constructorName + "'" - ); -}; + ) +} /** * @method missingProperty * @param {String} propertyName name of the property * @description Missing a property */ -exports.missingProperty = function missingProperty(propertyName) { - getLogger().warn("property '" + propertyName + "' is missing"); -}; +function missingProperty(propertyName) { + getLogger().warn("property '" + propertyName + "' is missing") +} /** * @method missingImplementation * @param {String} name name of the missing schema * @description A class definition is missing */ -exports.missingImplementation = function missingImplementation(name) { - getLogger().warn("schema '" + name + "' is missing"); -}; +function missingImplementation(name) { + getLogger().warn("schema '" + name + "' is missing") +} /** * @method invalidTypeImp @@ -229,11 +219,11 @@ exports.missingImplementation = function missingImplementation(name) { * @param {String} className a class name * @description Invalid type for a property of a class definition */ -exports.invalidTypeImp = function invalidTypeImp(property, className) { +function invalidTypeImp(property, className) { getLogger().error( "the property '" + property + "' of " + className + ' model is invalid' - ); -}; + ) +} /** * @method missingPropertyImp @@ -241,11 +231,11 @@ exports.invalidTypeImp = function invalidTypeImp(property, className) { * @param {String} className a class name * @description Missing a property for a class definition */ -exports.missingPropertyImp = function missingPropertyImp(property, className) { +function missingPropertyImp(property, className) { getLogger().warn( "missing property '" + property + "' in the model '" + className + "'" - ); -}; + ) +} /** * @method unknownPropertyImp @@ -253,20 +243,20 @@ exports.missingPropertyImp = function missingPropertyImp(property, className) { * @param {Object} schema a schema * @description Unkown property for a class definition */ -exports.unknownPropertyImp = function unknownPropertyImp(property, schema) { +function unknownPropertyImp(property, schema) { getLogger().error( "the model '" + schema + "' has an unknown property '" + property + "'" - ); -}; + ) +} /** * @method invalidTypeDefinition * @param {String} name a type definition * @description Try to add an invalid type */ -exports.invalidTypeDefinition = function invalidTypeDefinition(name) { - getLogger().warn("the type '" + name + "' is not valid"); -}; +function invalidTypeDefinition(name) { + getLogger().warn("the type '" + name + "' is not valid") +} /** * @method invalidPropertyName @@ -277,25 +267,19 @@ exports.invalidTypeDefinition = function invalidTypeDefinition(name) { * @param {String} type type defined by the schema * @description Invalid property name */ -exports.invalidPropertyName = function invalidPropertyName( - id, - className, - propertyName, - propertyValue, - type -) { - var classInfo = ''; - var realType = ''; +function invalidPropertyName(id, className, propertyName, propertyValue, type) { + let classInfo = '' + let realType = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } if (typeof type === 'string') { realType = propertyValue && propertyValue.constructor ? propertyValue.constructor.name - : typeof propertyValue; + : typeof propertyValue getLogger().warn( "invalid value for property '" + @@ -309,9 +293,9 @@ exports.invalidPropertyName = function invalidPropertyName( "' instead of type '" + realType + "'" - ); + ) } else { - realType = type && type.constructor ? type.constructor.name : typeof type; + realType = type && type.constructor ? type.constructor.name : typeof type getLogger().warn( "invalid value for property '" + @@ -321,9 +305,9 @@ exports.invalidPropertyName = function invalidPropertyName( ": expected type 'string' instead of type '" + realType + "'" - ); + ) } -}; +} /** * @method readOnlyProperty @@ -332,15 +316,11 @@ exports.invalidPropertyName = function invalidPropertyName( * @param {String} propertyName name of the property * @description Trying to set a read-only property */ -exports.readOnlyProperty = function readOnlyProperty( - id, - className, - propertyName -) { - var classInfo = ''; +function readOnlyProperty(id, className, propertyName) { + let classInfo = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } getLogger().warn( "can not set read-only property '" + @@ -349,8 +329,8 @@ exports.readOnlyProperty = function readOnlyProperty( id + "'" + classInfo - ); -}; + ) +} /** * @method invalidDocumentOnDbInsert @@ -358,18 +338,15 @@ exports.readOnlyProperty = function readOnlyProperty( * @param {String} collectionName the name of the collection * @description Invalid document on a System Runtime database insert operation */ -exports.invalidDocumentOnDbInsert = function invalidDocumentOnDbInsert( - doc, - collectionName -) { +function invalidDocumentOnDbInsert(doc, collectionName) { getLogger().warn( "invalid document '" + JSON.stringify(doc).replace(/,/g, ', ') + "' (" + collectionName + ' collection)' - ); -}; + ) +} /** * @method invalidPropertyTypeOnDbUpdate @@ -380,7 +357,7 @@ exports.invalidDocumentOnDbInsert = function invalidDocumentOnDbInsert( * @param {String} type expected type defined by the schema * @description Invalid property on a System Runtime database update operation */ -exports.invalidPropertyTypeOnDbUpdate = function invalidPropertyTypeOnDbUpdate( +function invalidPropertyTypeOnDbUpdate( collectionName, id, propertyName, @@ -399,8 +376,8 @@ exports.invalidPropertyTypeOnDbUpdate = function invalidPropertyTypeOnDbUpdate( "': expected type '" + type + "'" - ); -}; + ) +} /** * @method unknownPropertyOnDbUpdate @@ -409,11 +386,7 @@ exports.invalidPropertyTypeOnDbUpdate = function invalidPropertyTypeOnDbUpdate( * @param {String} id id of the component * @description Unkonw property on a System Runtime database update operation */ -exports.unknownPropertyOnDbUpdate = function unknownPropertyOnDbUpdate( - propertyName, - collectionName, - id -) { +function unknownPropertyOnDbUpdate(propertyName, collectionName, id) { getLogger().warn( "unknown property '" + propertyName + @@ -422,8 +395,8 @@ exports.unknownPropertyOnDbUpdate = function unknownPropertyOnDbUpdate( "' (" + collectionName + ' collection)' - ); -}; + ) +} /** * @method unknownMethod @@ -431,30 +404,30 @@ exports.unknownPropertyOnDbUpdate = function unknownPropertyOnDbUpdate( * @param {String} methodName name of the method * @description Call an unknown method of a class */ -exports.unknownMethod = function unknownMethod(classId, methodName) { +function unknownMethod(classId, methodName) { getLogger().warn( "try to call an unknown action '" + methodName + "' for the class '" + classId + "'" - ); -}; + ) +} /** * @method invalidCollectionName * @param {String} name name of the collection * @description Try to create an invalid DatabaseCollection */ -exports.invalidCollectionName = function invalidCollectionName(name) { +function invalidCollectionName(name) { getLogger().warn( "invalid name for the collection '" + name + "': there is no schema '" + name + "'" - ); -}; + ) +} /** * @method invalidResultType @@ -465,17 +438,11 @@ exports.invalidCollectionName = function invalidCollectionName(name) { * @param {String} type current type * @description Invalid type result of a method */ -exports.invalidResultType = function invalidResultType( - id, - className, - methodName, - expectedType, - type -) { - var classInfo = ''; +function invalidResultType(id, className, methodName, expectedType, type) { + let classInfo = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } getLogger().warn( @@ -490,8 +457,8 @@ exports.invalidResultType = function invalidResultType( "' instead of type '" + type + "'" - ); -}; + ) +} /** * @method unknownComponent @@ -499,11 +466,11 @@ exports.invalidResultType = function invalidResultType( * @param {String} componentId id of the component * @description Unknown class */ -exports.unknownComponent = function unknownComponent(className, componentId) { +function unknownComponent(className, componentId) { getLogger().warn( "unkown class name '" + className + "' for component '" + componentId + "'" - ); -}; + ) +} /** * @method invalidParamNumber @@ -512,15 +479,11 @@ exports.unknownComponent = function unknownComponent(className, componentId) { * @param {String} methodName name of the component * @description invalid parameter number for a method */ -exports.invalidParamNumber = function invalidParamNumber( - id, - className, - methodName -) { - var classInfo = ''; +function invalidParamNumber(id, className, methodName) { + let classInfo = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } getLogger().warn( @@ -530,8 +493,8 @@ exports.invalidParamNumber = function invalidParamNumber( id + "'" + classInfo - ); -}; + ) +} /** * @method invalidParamType @@ -541,16 +504,11 @@ exports.invalidParamNumber = function invalidParamNumber( * @param {String} paramName name of the parameter * @description Invalid type parameters for a method */ -exports.invalidParamType = function invalidParamType( - id, - className, - methodName, - paramName -) { - var classInfo = ''; +function invalidParamType(id, className, methodName, paramName) { + let classInfo = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } if (paramName !== undefined) { getLogger().warn( @@ -562,7 +520,7 @@ exports.invalidParamType = function invalidParamType( id + "'" + classInfo - ); + ) } else { getLogger().warn( "invalid type for a parameter when calling the action '" + @@ -571,9 +529,9 @@ exports.invalidParamType = function invalidParamType( id + "'" + classInfo - ); + ) } -}; +} /** * @method behaviorNotUnique @@ -581,15 +539,15 @@ exports.invalidParamType = function invalidParamType( * @param {String} stateName name of the state * @description Add a more than one behavior to a state */ -exports.behaviorNotUnique = function behaviorNotUnique(id, stateName) { +function behaviorNotUnique(id, stateName) { getLogger().warn( "try to add more than one action for the state '" + stateName + "' on class '" + id + "'" - ); -}; + ) +} /** * @method invalidStateOn @@ -597,15 +555,15 @@ exports.behaviorNotUnique = function behaviorNotUnique(id, stateName) { * @param {String} stateName name of the state * @description Can not add a behavior with an invalid state */ -exports.invalidStateOn = function invalidStateOn(id, stateName) { +function invalidStateOn(id, stateName) { getLogger().warn( "try to add an action to an unkwown state '" + stateName + "' on class '" + id + "'" - ); -}; + ) +} /** * @method invalidStateOff @@ -613,23 +571,23 @@ exports.invalidStateOn = function invalidStateOn(id, stateName) { * @param {String} stateName name of the state * @description The call to a remove state of the behavior module is invalid */ -exports.invalidStateOff = function invalidStateOff(id, stateName) { +function invalidStateOff(id, stateName) { getLogger().warn( "try to remove an action from an unkwown state '" + stateName + "' on class '" + id + "'" - ); -}; + ) +} /** * @method masterSystemNotFound * @description The master system is not found */ -exports.masterSystemNotFound = function masterSystemNotFound() { - getLogger().warn('can not export the database because no system was defined'); -}; +function masterSystemNotFound() { + getLogger().warn('can not export the database because no system was defined') +} /** * @method invalidType @@ -638,9 +596,9 @@ exports.masterSystemNotFound = function masterSystemNotFound() { * @param {String} typeName expected type defined by the schema * @description Invalid type */ -exports.invalidType = function invalidType(name, value, typeName) { - var realType = - name && value.constructor ? value.constructor.name : typeof value; +function invalidType(name, value, typeName) { + let realType = + name && value.constructor ? value.constructor.name : typeof value getLogger().warn( "invalid value for property '" + @@ -650,8 +608,8 @@ exports.invalidType = function invalidType(name, value, typeName) { "' instead of type '" + realType + "'" - ); -}; + ) +} /** * @method invalidConfiguration @@ -659,20 +617,20 @@ exports.invalidType = function invalidType(name, value, typeName) { * @param {String} type expected type for the configuration * @description Invalid class name */ -exports.invalidConfiguration = function invalidConfiguration(obj, type) { +function invalidConfiguration(obj, type) { getLogger().warn( "invalid type for '" + JSON.stringify(obj) + "': expected '" + type + "'" - ); -}; + ) +} /** * @method unknownType * @param {String} value value * @description Unknown type */ -exports.unknownType = function unknownType(value) { - getLogger().warn("unknown type for value '" + JSON.stringify(value) + "'"); -}; +function unknownType(value) { + getLogger().warn("unknown type for value '" + JSON.stringify(value) + "'") +} /** * @method unknownPath @@ -680,11 +638,11 @@ exports.unknownType = function unknownType(value) { * @param {String} path subpath * @description Unknown subpath in a path */ -exports.unknownPath = function unknownPath(path, subpath) { +function unknownPath(path, subpath) { getLogger().warn( "the path '" + path + "' has an unkown subpath '" + subpath + "'" - ); -}; + ) +} /** * @method canNotYetValidate @@ -692,15 +650,15 @@ exports.unknownPath = function unknownPath(path, subpath) { * @param {String} className name of the class * @description A component has not been alreay validated */ -exports.canNotYetValidate = function canNotYetValidate(id, className) { +function canNotYetValidate(id, className) { getLogger().debug( "can not yet validate if the document '" + id + "' is compliant with " + className + ' model' - ); -}; + ) +} /** * @method invalidChannelEvent @@ -709,11 +667,7 @@ exports.canNotYetValidate = function canNotYetValidate(id, className) { * @param {String} type expected type * @description A message send by the channel is invalid */ -exports.invalidChannelEvent = function invalidChannelEvent( - message, - eventName, - type -) { +function invalidChannelEvent(message, eventName, type) { getLogger().warn( "invalid type for the message '" + JSON.stringify(message) + @@ -722,8 +676,8 @@ exports.invalidChannelEvent = function invalidChannelEvent( "' for event '" + eventName + "'" - ); -}; + ) +} /** * @method invalidParamNumberMethodOn @@ -732,15 +686,11 @@ exports.invalidChannelEvent = function invalidChannelEvent( * @param {String} methodName name of the component * @description invalid parameter number for a behavior add with 'on' method */ -exports.invalidParamNumberMethodOn = function invalidParamNumberMethodOn( - id, - className, - methodName -) { - var classInfo = ''; +function invalidParamNumberMethodOn(id, className, methodName) { + let classInfo = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } getLogger().warn( "invalid number of parameters when adding an action for the state '" + @@ -749,8 +699,8 @@ exports.invalidParamNumberMethodOn = function invalidParamNumberMethodOn( id + "'" + classInfo - ); -}; + ) +} /** * @method updateUuid @@ -759,7 +709,7 @@ exports.invalidParamNumberMethodOn = function invalidParamNumberMethodOn( * @param {Boolean} alreadyUsed newId already used * @description Change the id of a component */ -exports.updateUuid = function updateUuid(currentId, newId, alreadyUsed) { +function updateUuid(currentId, newId, alreadyUsed) { if (alreadyUsed) { getLogger().warn( "try to update a component of id '" + @@ -767,7 +717,7 @@ exports.updateUuid = function updateUuid(currentId, newId, alreadyUsed) { "' with the new id '" + newId + "' that is already used" - ); + ) } else { getLogger().warn( "try to update a component of id '" + @@ -775,46 +725,46 @@ exports.updateUuid = function updateUuid(currentId, newId, alreadyUsed) { "' with the new id '" + newId + "'" - ); + ) } -}; +} /** * @method invalidUseOfComponent * @param {String} id id of the component * @description Try to change the state of a component that has been destroyed */ -exports.invalidUseOfComponent = function invalidUseOfComponent(id) { +function invalidUseOfComponent(id) { getLogger().warn( "try to change the state of the destroyed component '" + id + "'" - ); -}; + ) +} /** * @method invalidSchema * @param {String} name name of the schema * @description Try to add an invalid schema */ -exports.invalidSchema = function invalidSchema(name) { +function invalidSchema(name) { getLogger().warn( "the schema '" + name + "' is not valid, it has been removed from the metamodel" - ); -}; + ) +} /** * @method invalidModel * @param {String} name name of the model * @description Try to add an invalid model */ -exports.invalidModel = function invalidModel(name) { +function invalidModel(name) { getLogger().warn( "the model '" + name + "' is not valid, it has been removed from the metamodel" - ); -}; + ) +} /** * @method invalidParameters @@ -822,8 +772,8 @@ exports.invalidModel = function invalidModel(name) { * @param {String} document document * @description Invalid parameters set when creating an instance of a class */ -exports.invalidParameters = function invalidParameters(classId, document) { - var id = document && document._id ? document._id : ''; +function invalidParameters(classId, document) { + let id = document && document._id ? document._id : '' getLogger().warn( "the parameters for creating '" + @@ -831,8 +781,8 @@ exports.invalidParameters = function invalidParameters(classId, document) { "' component (" + classId + ' model) are not compliant with the model' - ); -}; + ) +} /** * @method destroyedComponentCall @@ -840,18 +790,15 @@ exports.invalidParameters = function invalidParameters(classId, document) { * @param {String} id id of the component * @description Try to get the property of a destroyed component */ -exports.destroyedComponentCall = function destroyedComponentCall( - propertyName, - id -) { +function destroyedComponentCall(propertyName, id) { getLogger().warn( "trying to get the property '" + propertyName + "' on the destroyed component '" + id + "'" - ); -}; + ) +} /** * @method invalidConctructorParameters @@ -859,55 +806,52 @@ exports.destroyedComponentCall = function destroyedComponentCall( * @param {String} name schema name * @description Invalid parameter type when creating an instance of a class */ -exports.invalidConctructorParameters = function invalidConctructorParameters( - object, - name -) { +function invalidConctructorParameters(object, name) { getLogger().warn( "the constructor parameter '" + JSON.stringify(object).replace(/,/g, ', ') + "' for creating a component of class '" + name + "' is not an object" - ); -}; + ) +} /** * @method unknownModel * @param {String} classId id of the class * @description Get the information of an unkown model */ -exports.unknownModel = function unknownModel(classId) { - getLogger().warn("the model '" + classId + "' does not exist"); -}; +function unknownModel(classId) { + getLogger().warn("the model '" + classId + "' does not exist") +} /** * @method missingSchema * @param {String} name name of the schema * @description A schema is missing */ -exports.missingSchema = function missingSchema(name) { - getLogger().warn("the schema '" + name + "' is missing"); -}; +function missingSchema(name) { + getLogger().warn("the schema '" + name + "' is missing") +} /** * @method missingSchema * @param {String} name name of the schema where the cyclic dependency was found * @description A cyclic dependency was found */ -exports.cyclicDependency = function cyclicDependency(name) { +function cyclicDependency(name) { if (name) { getLogger().error( "a cyclic inheritance dependency with the schema '" + name + "’ has been found, please check the '_inherit' property of this schema" - ); + ) } else { getLogger().error( "a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas" - ); + ) } -}; +} /** * @method invalidEnumType @@ -916,12 +860,12 @@ exports.cyclicDependency = function cyclicDependency(name) { * @param {String} type typeName of the type * @description Invalid type for a type enum */ -exports.invalidEnumType = function invalidEnumType(value, typeName, type) { - var realType = ''; +function invalidEnumType(value, typeName, type) { + let realType = '' if (typeof type !== 'undefined' && type !== typeof value) { realType = - value && value.constructor ? value.constructor.name : typeof value; + value && value.constructor ? value.constructor.name : typeof value getLogger().warn( "invalid type for the type '" + typeName + @@ -930,73 +874,73 @@ exports.invalidEnumType = function invalidEnumType(value, typeName, type) { "' instead of type '" + realType + "'" - ); + ) } else { - getLogger().warn("invalid type for the type '" + typeName + "'"); + getLogger().warn("invalid type for the type '" + typeName + "'") } -}; +} /** * @method loadSchema * @param {String} name name of the schema * @description Load schema */ -exports.loadSchema = function loadSchema(name) { - getLogger().debug("load schema '" + name + "'"); -}; +function loadSchema(name) { + getLogger().debug("load schema '" + name + "'") +} /** * @method loadModel * @param {String} name name of the model * @description Load model */ -exports.loadModel = function loadModel(name) { - getLogger().debug("load model '" + name + "'"); -}; +function loadModel(name) { + getLogger().debug("load model '" + name + "'") +} /** * @method loadType * @param {String} name name of the type * @description Load type */ -exports.loadType = function loadType(name) { - getLogger().debug("load type '" + name + "'"); -}; +function loadType(name) { + getLogger().debug("load type '" + name + "'") +} /** * @method generatingSchema * @param {String} name name of the schema * @description Generate schema */ -exports.generatingSchema = function generatingSchema(name) { - getLogger().debug('generating ' + name + ' schema ...'); -}; +function generatingSchema(name) { + getLogger().debug('generating ' + name + ' schema ...') +} /** * @method checkModel * @param {String} name name of the model * @description Check model */ -exports.checkModel = function checkModel(name) { - getLogger().debug('analyzing ' + name + ' model...'); -}; +function checkModel(name) { + getLogger().debug('analyzing ' + name + ' model...') +} /** * @method createClass * @param {String} name name of the class * @description Create class */ -exports.createClass = function createClass(name) { - getLogger().debug(name + ' class has been created'); -}; +function createClass(name) { + getLogger().debug(name + ' class has been created') +} /** * @method initDb * @description Init the database */ -exports.initDb = function initDb() { - getLogger().debug('initializing data store...'); -}; +function initDb() { + getLogger().debug('initializing data store...') +} /** * @method actionInvokeError @@ -1006,12 +950,7 @@ exports.initDb = function initDb() { * @param {String} message * @description An error happened when invoking a behavior */ -exports.actionInvokeError = function actionInvokeError( - state, - id, - className, - message -) { +function actionInvokeError(state, id, className, message) { if (className !== 'Function') { getLogger().error( "error when calling the action '" + @@ -1022,7 +961,7 @@ exports.actionInvokeError = function actionInvokeError( className + ' class): ' + message - ); + ) } else { getLogger().error( "error when calling the action '" + @@ -1031,9 +970,9 @@ exports.actionInvokeError = function actionInvokeError( id + "': " + message - ); + ) } -}; +} /** * @method invalidSchemaPropertyName @@ -1041,18 +980,15 @@ exports.actionInvokeError = function actionInvokeError( * @param {String} propName name of the property * @description Invalid name for the property of a schema */ -exports.invalidSchemaPropertyName = function invalidSchemaPropertyName( - name, - propName -) { +function invalidSchemaPropertyName(name, propName) { getLogger().warn( "invalid name '" + propName + "' for schema '" + name + "': a property name can not begin with '_'" - ); -}; + ) +} /** * @method invalidSchemaProperty @@ -1060,28 +996,28 @@ exports.invalidSchemaPropertyName = function invalidSchemaPropertyName( * @param {String} propName name of the property * @description Invalid name for the property of a schema */ -exports.invalidSchemaProperty = function invalidSchemaProperty(name, propName) { +function invalidSchemaProperty(name, propName) { getLogger().warn( "invalid property '" + propName + "' for schema '" + name + "': only 'property', 'link', 'collection', 'method' and 'event' are allowed" - ); -}; + ) +} /** * @method invalidPropertyFormat * @param {String} obj definition of a property * @description Invalid format for the definition of a property */ -exports.invalidPropertyFormat = function invalidPropertyFormat(obj) { +function invalidPropertyFormat(obj) { getLogger().warn( "invalid format for a definition of a property: '" + obj + "' is not an object" - ); -}; + ) +} /** * @method invalidState @@ -1089,11 +1025,11 @@ exports.invalidPropertyFormat = function invalidPropertyFormat(obj) { * @param {String} state invalid state * @description Invalid state */ -exports.invalidState = function invalidState(model, state) { +function invalidState(model, state) { getLogger().warn( "invalid state '" + state + "' for the model '" + model + "'" - ); -}; + ) +} /** * @method unknownContext @@ -1101,15 +1037,15 @@ exports.invalidState = function invalidState(model, state) { * @param {String} methodName name of the method * @description Invoke a method class without a context */ -exports.unknownContext = function unknownContext(className, methodName) { +function unknownContext(className, methodName) { getLogger().warn( "invoke the action '" + methodName + "' on the class '" + className + "' without a valid context" - ); -}; + ) +} /** * @method historyDocumentInserted @@ -1118,11 +1054,7 @@ exports.unknownContext = function unknownContext(className, methodName) { * @param {String} document * @description Created document from history */ -exports.historyDocumentInserted = function historyDocumentInserted( - id, - collectionName, - doc -) { +function historyDocumentInserted(id, collectionName, doc) { getLogger().debug( "Created component of id '" + id + @@ -1131,8 +1063,8 @@ exports.historyDocumentInserted = function historyDocumentInserted( " collection) with document '" + doc + "'" - ); -}; + ) +} /** * @method historyDocumentRemoved @@ -1140,14 +1072,11 @@ exports.historyDocumentInserted = function historyDocumentInserted( * @param {String} collectionName collectionName of the component * @description Removed document from history */ -exports.historyDocumentRemoved = function historyDocumentRemoved( - id, - collectionName -) { +function historyDocumentRemoved(id, collectionName) { getLogger().debug( "Destroyed component of id '" + id + "' (" + collectionName + ' collection)' - ); -}; + ) +} /** * @method historyDocumentUpdated @@ -1157,12 +1086,7 @@ exports.historyDocumentRemoved = function historyDocumentRemoved( * @param {String} value value of the field * @description Updated document from history */ -exports.historyDocumentUpdated = function historyDocumentRemoved( - id, - collectionName, - fieldName, - value -) { +function historyDocumentUpdated(id, collectionName, fieldName, value) { getLogger().debug( "Updated field '" + fieldName + @@ -1173,8 +1097,8 @@ exports.historyDocumentUpdated = function historyDocumentRemoved( "' (" + collectionName + ' collection)' - ); -}; + ) +} /** * @method invalidCollectionItem @@ -1183,17 +1107,17 @@ exports.historyDocumentUpdated = function historyDocumentRemoved( * @param {String} constructorName name of the component class * @description Invalid class name for a component */ -exports.invalidCollectionItem = function invalidCollectionItem( +function invalidCollectionItem( id, className, propertyName, propertyValue, type ) { - var classInfo = ''; + let classInfo = '' if (className !== 'Function') { - classInfo = ' (' + className + ' class)'; + classInfo = ' (' + className + ' class)' } getLogger().warn( @@ -1208,5 +1132,69 @@ exports.invalidCollectionItem = function invalidCollectionItem( "' for all items of the collection '" + JSON.stringify(propertyValue) + "'" - ); -}; + ) +} + +export default { + level, + unknownProperty, + invalidPropertyType, + invalidEnumValue, + invalidClassName, + missingProperty, + missingImplementation, + invalidTypeImp, + missingPropertyImp, + unknownPropertyImp, + invalidTypeDefinition, + invalidPropertyName, + readOnlyProperty, + invalidDocumentOnDbInsert, + invalidPropertyTypeOnDbUpdate, + unknownPropertyOnDbUpdate, + unknownMethod, + invalidCollectionName, + invalidResultType, + unknownComponent, + invalidParamNumber, + invalidParamType, + behaviorNotUnique, + invalidStateOn, + invalidStateOff, + masterSystemNotFound, + invalidType, + invalidConfiguration, + unknownType, + unknownPath, + canNotYetValidate, + invalidChannelEvent, + invalidParamNumberMethodOn, + updateUuid, + invalidUseOfComponent, + invalidSchema, + invalidModel, + invalidParameters, + destroyedComponentCall, + invalidConctructorParameters, + unknownModel, + missingSchema, + cyclicDependency, + invalidEnumType, + loadSchema, + loadModel, + loadType, + generatingSchema, + checkModel, + createClass, + initDb, + actionInvokeError, + invalidSchemaPropertyName, + invalidSchemaProperty, + invalidPropertyFormat, + invalidState, + unknownContext, + historyDocumentInserted, + historyDocumentRemoved, + historyDocumentUpdated, + invalidCollectionItem, +} diff --git a/src/metamodel.js b/src/metamodel.js index 5a6825f..3490590 100644 --- a/src/metamodel.js +++ b/src/metamodel.js @@ -31,17 +31,15 @@ * creates the component classes and related DatabaseCollections. */ -'use strict'; - -var $db = require('./db.js'); -var $log = require('./log.js'); -var $component = require('./component.js'); -var $helper = require('./helper.js'); -var $mson = require('./mson.js'); +import $db from './db.js' +import $log from './log.js' +import $component from './component.js' +import $helper from './helper.js' +import $mson from './mson.js' /* Private properties */ -var store = { +let store = { inheritance: {}, inheritanceTree: {}, schemas: {}, @@ -50,7 +48,7 @@ var store = { generatedModels: {}, states: {}, type: {}, -}; +} /* Private methods */ @@ -61,12 +59,12 @@ var store = { * @description is name an internal name */ function isInternalName(name) { - var result = true; + let result = true if ($mson.INTERNAL_NAMES.indexOf(name) === -1) { - result = false; + result = false } - return result; + return result } /** @@ -75,57 +73,57 @@ function isInternalName(name) { * @description Generate the models */ function generateModels() { - var att = ''; - var name = ''; - var schemaName = ''; - var schema = {}; - var schemaDef = null; - var modelName = ''; - var modelParent = null; - var modelExt = null; - var modelDef = null; - var model = {}; - var mergedModel = {}; - var parents = []; - var length = 0; - var i = 0; - var j = 0; - var nbAncestors = 0; - var sortInheritTree = []; + let att = '' + let name = '' + let schemaName = '' + let schema = {} + let schemaDef = null + let modelName = '' + let modelParent = null + let modelExt = null + let modelDef = null + let model = {} + let mergedModel = {} + let parents = [] + let length = 0 + let i = 0 + let j = 0 + let nbAncestors = 0 + let sortInheritTree = [] // default values for (schemaName in store.generatedSchemas) { - schema = store.generatedSchemas[schemaName]; + schema = store.generatedSchemas[schemaName] // set model internal properties model = { _name: schema[$mson.NAME], - }; + } // set _core if (typeof schema[$mson.CORE] !== 'undefined') { - model[$mson.CORE] = schema[$mson.CORE]; + model[$mson.CORE] = schema[$mson.CORE] } // set inherit if (Array.isArray(schema[$mson.INHERIT])) { - model[$mson.INHERIT] = schema[$mson.INHERIT]; + model[$mson.INHERIT] = schema[$mson.INHERIT] } // set class if (typeof schema[$mson.CLASS] !== 'undefined') { - model[$mson.CLASS] = schema[$mson.CLASS]; + model[$mson.CLASS] = schema[$mson.CLASS] } // set description if (typeof schema[$mson.DESCRIPTION] !== 'undefined') { - model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]; + model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION] } // check valid name for (att in schema) { if (!isInternalName(att) && att.indexOf('_') === 0) { - $log.invalidSchemaPropertyName(schema[$mson.NAME], att); + $log.invalidSchemaPropertyName(schema[$mson.NAME], att) } } @@ -140,8 +138,8 @@ function generateModels() { default: '', description: att, label: att, - }; - break; + } + break case schema[att] === 'link': model[att] = { type: '_Component', @@ -150,8 +148,8 @@ function generateModels() { default: '', description: att, label: att, - }; - break; + } + break case schema[att] === 'method': model[att] = { params: [ @@ -176,8 +174,8 @@ function generateModels() { ], result: 'any', description: att, - }; - break; + } + break case schema[att] === 'event': model[att] = { params: [ @@ -201,8 +199,8 @@ function generateModels() { }, ], description: att, - }; - break; + } + break case schema[att] === 'collection': model[att] = { type: ['_Component'], @@ -211,70 +209,70 @@ function generateModels() { default: [], description: att, label: att, - }; - break; + } + break default: if (!isInternalName(att)) { - $log.invalidSchemaProperty(schema[$mson.NAME], att); + $log.invalidSchemaProperty(schema[$mson.NAME], att) } - break; + break } } - store.generatedModels[model[$mson.NAME]] = model; + store.generatedModels[model[$mson.NAME]] = model } // models to override for (modelName in store.generatedModels) { - model = store.generatedModels[modelName]; - name = model[$mson.NAME]; - modelExt = store.models[name]; + model = store.generatedModels[modelName] + name = model[$mson.NAME] + modelExt = store.models[name] if (modelExt) { - mergedModel = merge(modelExt, model); - store.generatedModels[name] = mergedModel; + mergedModel = merge(modelExt, model) + store.generatedModels[name] = mergedModel } } // inheritance - sortInheritTree = sortInheritanceTree(); + sortInheritTree = sortInheritanceTree() - nbAncestors = sortInheritTree.length; + nbAncestors = sortInheritTree.length for (i = 0; i < nbAncestors; i++) { - modelName = sortInheritTree[i]; - model = store.generatedModels[modelName]; + modelName = sortInheritTree[i] + model = store.generatedModels[modelName] if (model) { - parents = exports.getParents(modelName); - parents.reverse(); + parents = getParents(modelName) + parents.reverse() - length = parents.length; + length = parents.length for (j = 0; j < length; j++) { - name = parents[j]; - modelParent = store.generatedModels[name]; + name = parents[j] + modelParent = store.generatedModels[name] if (modelParent) { - mergedModel = merge(modelParent, model); - store.generatedModels[modelName] = mergedModel; + mergedModel = merge(modelParent, model) + store.generatedModels[modelName] = mergedModel } } // last inherit // is the overriden model - modelExt = store.models[modelName]; + modelExt = store.models[modelName] if (modelExt) { - mergedModel = merge(modelExt, store.generatedModels[modelName]); - store.generatedModels[modelName] = mergedModel; + mergedModel = merge(modelExt, store.generatedModels[modelName]) + store.generatedModels[modelName] = mergedModel } } } // save for (schemaName in store.generatedSchemas) { - schemaDef = store.generatedSchemas[schemaName]; - $db._GeneratedSchema.insert(schemaDef); + schemaDef = store.generatedSchemas[schemaName] + $db.collections._GeneratedSchema.insert(schemaDef) } for (modelName in store.generatedModels) { - modelDef = store.generatedModels[modelName]; - $db._GeneratedModel.insert(modelDef); + modelDef = store.generatedModels[modelName] + $db.collections._GeneratedModel.insert(modelDef) } } @@ -284,72 +282,72 @@ function generateModels() { * @description Load schemas and types in memory */ function loadInMemory() { - var schemas = []; - var types = []; - var schema = null; - var model = {}; - var models = []; - var type = null; - var name = ''; - var inherit = ''; - var i = 0; - var length = 0; + let schemas = [] + let types = [] + let schema = null + let model = {} + let models = [] + let type = null + let name = '' + let inherit = '' + let i = 0 + let length = 0 // init store - store.inheritance = {}; - store.inheritanceTree = {}; - store.schemas = {}; - store.generatedSchemas = {}; - store.models = {}; - store.generatedModels = {}; - store.states = {}; - store.type = {}; + store.inheritance = {} + store.inheritanceTree = {} + store.schemas = {} + store.generatedSchemas = {} + store.models = {} + store.generatedModels = {} + store.states = {} + store.type = {} // load schemas - schemas = $db._Schema.find({}); + schemas = $db.collections._Schema.find({}) - length = schemas.length; + length = schemas.length for (i = 0; i < length; i++) { - schema = schemas[i]; + schema = schemas[i] - name = schema[$mson.NAME]; - inherit = schema[$mson.INHERIT]; + name = schema[$mson.NAME] + inherit = schema[$mson.INHERIT] - store.schemas[name] = schema; + store.schemas[name] = schema if (inherit) { - store.inheritance[name] = inherit; + store.inheritance[name] = inherit } if (!schema[$mson.CORE]) { - $log.loadSchema(name); + $log.loadSchema(name) } } // load models - models = $db._Model.find({}); + models = $db.collections._Model.find({}) - length = models.length; + length = models.length for (i = 0; i < length; i++) { - model = models[i]; - name = model[$mson.NAME]; + model = models[i] + name = model[$mson.NAME] - store.models[name] = model; + store.models[name] = model if (!model[$mson.CORE]) { - $log.loadModel(name); + $log.loadModel(name) } } // load types - types = $db._Type.find({}); + types = $db.collections._Type.find({}) - length = types.length; + length = types.length for (i = 0; i < length; i++) { - type = types[i]; - store.type[type.name] = type; + type = types[i] + store.type[type.name] = type if (!type.core) { - $log.loadType(type.name); + $log.loadType(type.name) } } } @@ -360,9 +358,9 @@ function loadInMemory() { * @description Create the inheritance tree */ function createInheritanceTree() { - var name = ''; - var c3linerization = []; - var ancestors = []; + let name = '' + let c3linerization = [] + let ancestors = [] /** * @@ -372,17 +370,17 @@ function createInheritanceTree() { * @description Check if we have finisehd to linerize */ function _isEmpty(elts) { - var i = 0; - var length = 0; - var result = true; + let i = 0 + let length = 0 + let result = true - length = elts.length; + length = elts.length for (i = 0; i < length; i++) { if (elts[i].length) { - result = false; + result = false } } - return result; + return result } /** @@ -392,18 +390,18 @@ function createInheritanceTree() { * @description Remove an elt from all the arrays */ function _removeCandidate(elt, elts) { - var i = 0; - var length = 0; - var arr = []; + let i = 0 + let length = 0 + let arr = [] - length = elts.length; + length = elts.length for (i = 0; i < length; i++) { if (elts[i].indexOf(elt) === 0) { - arr = elts[i]; - arr.reverse(); - arr.pop(); - arr.reverse(); - elts[i] = arr; + arr = elts[i] + arr.reverse() + arr.pop() + arr.reverse() + elts[i] = arr } } } @@ -417,18 +415,18 @@ function createInheritanceTree() { * @description Check the element is a good candidate */ function _isCandidate(elt, elts) { - var result = true; - var i = 0; - var length = 0; + let result = true + let i = 0 + let length = 0 - length = elts.length; + length = elts.length for (i = 0; i < length; i++) { if (elts[i].indexOf(elt) > 0) { - result = false; + result = false } } - return result; + return result } /** @@ -439,19 +437,19 @@ function createInheritanceTree() { * @description Find a candidate and return it. */ function _findCandidate(elts) { - var i = 0; - var length = 0; - var result = []; + let i = 0 + let length = 0 + let result = [] - length = elts.length; + length = elts.length for (i = 0; i < length; i++) { if (_isCandidate(elts[i][0], elts)) { - result.push(elts[i][0]); - _removeCandidate(elts[i][0], elts); - break; + result.push(elts[i][0]) + _removeCandidate(elts[i][0], elts) + break } } - return result; + return result } /** @@ -462,19 +460,19 @@ function createInheritanceTree() { * @description Merge the arrays */ function _merge(elts) { - var result = []; - var candidates = []; + let result = [] + let candidates = [] - candidates = _findCandidate(elts); + candidates = _findCandidate(elts) while (candidates[0] !== undefined) { - result = result.concat(candidates); - candidates = _findCandidate(elts); + result = result.concat(candidates) + candidates = _findCandidate(elts) } if (!_isEmpty(elts)) { - $log.cyclicDependency(); + $log.cyclicDependency() } - return result; + return result } /** @@ -485,10 +483,10 @@ function createInheritanceTree() { * @description Start the linerieation from an element */ function _linerize(name) { - var result = []; - var parents = []; - var i = 0; - var length = 0; + let result = [] + let parents = [] + let i = 0 + let length = 0 /** * @method _checkCyclicDep @@ -499,46 +497,46 @@ function createInheritanceTree() { * @description Check if there is a cyclic dependency */ function _checkCyclicDep(name, item) { - var isCyclicDeb = false; + let isCyclicDeb = false if ( Array.isArray(store.inheritance[item]) && store.inheritance[item].indexOf(name) !== -1 ) { - $log.cyclicDependency(name); - isCyclicDeb = true; + $log.cyclicDependency(name) + isCyclicDeb = true } - return isCyclicDeb; + return isCyclicDeb } if (Array.isArray(store.inheritance[name])) { - parents = store.inheritance[name].slice(); + parents = store.inheritance[name].slice() } else { - $log.missingSchema(name); + $log.missingSchema(name) } - length = parents.length; + length = parents.length for (i = 0; i < length; i++) { if (_checkCyclicDep(name, parents[i])) { - parents = []; - break; + parents = [] + break } } if (parents.length) { - result = [name].concat(_merge(parents.map(_linerize).concat([parents]))); + result = [name].concat(_merge(parents.map(_linerize).concat([parents]))) } else { - result = [name]; + result = [name] } - return result; + return result } for (name in store.inheritance) { - c3linerization = _linerize(name); - ancestors = c3linerization.reverse(); - ancestors.pop(); + c3linerization = _linerize(name) + ancestors = c3linerization.reverse() + ancestors.pop() if (ancestors.length) { - store.inheritanceTree[name] = ancestors; + store.inheritanceTree[name] = ancestors } } } @@ -551,30 +549,30 @@ function createInheritanceTree() { * @description Extend a schema with the properties of its parent */ function extend(name) { - var sonExtend = {}; - var son = store.schemas[name]; - var ancestors = store.inheritanceTree[name]; - var length = 0; - var i = 0; - var ancestor = null; - var prop = ''; + let sonExtend = {} + let son = store.schemas[name] + let ancestors = store.inheritanceTree[name] + let length = 0 + let i = 0 + let ancestor = null + let prop = '' if (ancestors) { - length = ancestors.length; - ancestors.reverse(); + length = ancestors.length + ancestors.reverse() } for (i = 0; i < length; i++) { - ancestor = store.schemas[ancestors[i]]; + ancestor = store.schemas[ancestors[i]] for (prop in ancestor) { if (prop.indexOf('_') !== 0) { - sonExtend[prop] = ancestor[prop]; + sonExtend[prop] = ancestor[prop] } } } for (prop in son) { - sonExtend[prop] = son[prop]; + sonExtend[prop] = son[prop] } - return sonExtend; + return sonExtend } /** @@ -584,28 +582,28 @@ function extend(name) { * @description Get sorted InheritanceTree structure */ function sortInheritanceTree() { - var result = []; - var temp = {}; - var keys = []; - var modelName = ''; - var nbAncestors = 0; + let result = [] + let temp = {} + let keys = [] + let modelName = '' + let nbAncestors = 0 for (modelName in store.inheritanceTree) { - nbAncestors = store.inheritanceTree[modelName].length; + nbAncestors = store.inheritanceTree[modelName].length if (typeof temp[nbAncestors] === 'undefined') { - temp[nbAncestors] = []; + temp[nbAncestors] = [] } - temp[nbAncestors].push(modelName); + temp[nbAncestors].push(modelName) } - keys = Object.keys(temp).sort(); + keys = Object.keys(temp).sort() keys.forEach(function (index) { temp[index].forEach(function (model) { - result.push(model); - }); - }); + result.push(model) + }) + }) - return result; + return result } /** @@ -614,14 +612,14 @@ function sortInheritanceTree() { * @description Generate the schemas */ function generateSchemas() { - var name = ''; + let name = '' for (name in store.schemas) { if (!store.schemas[name][$mson.CORE]) { - $log.generatingSchema(name); + $log.generatingSchema(name) } - store.generatedSchemas[name] = extend(name); + store.generatedSchemas[name] = extend(name) } } @@ -631,21 +629,21 @@ function generateSchemas() { * @description Test if all the models are compliants with their schemas */ function checkModels() { - var name = ''; - var classDef = null; - var schema = ''; + let name = '' + let classDef = null + let schema = '' for (name in store.generatedModels) { - classDef = store.generatedModels[name]; + classDef = store.generatedModels[name] if (classDef) { - schema = store.generatedSchemas[name]; + schema = store.generatedSchemas[name] if (schema) { if (!classDef[$mson.CORE]) { - $log.checkModel(name); + $log.checkModel(name) } - checkImp(classDef, schema); + checkImp(classDef, schema) } else { - $log.missingImplementation(name); + $log.missingImplementation(name) } } } @@ -657,27 +655,27 @@ function checkModels() { * @description Get all the states of a schema */ function getStates() { - var name = ''; - var schema = null; - var type = ''; - var states = []; - var attribute = ''; + let name = '' + let schema = null + let type = '' + let states = [] + let attribute = '' for (name in store.generatedSchemas) { - states = []; - schema = store.generatedSchemas[name]; + states = [] + schema = store.generatedSchemas[name] if (schema) { for (attribute in schema) { - type = schema[attribute]; + type = schema[attribute] if ( attribute.indexOf('_') !== 0 && $mson.INTERNAL_TYPES.indexOf(type) !== -1 ) { - states.push(attribute); + states.push(attribute) } } } - store.states[name] = states; + store.states[name] = states } } @@ -689,8 +687,8 @@ function getStates() { * @description Test if a schema is compliant with its schema */ function checkImp(classDef, classImp) { - var property = ''; - var value = null; + let property = '' + let value = null for (property in classImp) { if ( @@ -702,12 +700,12 @@ function checkImp(classDef, classImp) { property !== $mson.CORE ) { if (typeof classDef[property] !== 'undefined') { - value = classDef[property]; + value = classDef[property] if (!checkSchema(value, classImp[property])) { - $log.invalidTypeImp(property, classDef[$mson.NAME]); + $log.invalidTypeImp(property, classDef[$mson.NAME]) } } else { - $log.missingPropertyImp(property, classDef[$mson.NAME]); + $log.missingPropertyImp(property, classDef[$mson.NAME]) } } } @@ -722,7 +720,7 @@ function checkImp(classDef, classImp) { property !== $mson.CORE ) { if (typeof classImp[property] === 'undefined') { - $log.unknownPropertyImp(property, classDef[$mson.NAME]); + $log.unknownPropertyImp(property, classDef[$mson.NAME]) } } } @@ -737,14 +735,14 @@ function checkImp(classDef, classImp) { * @description Test if a value has the correct type */ function checkSchema(value, type) { - var result = true; + let result = true if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) { - result = hasType(value, type); + result = hasType(value, type) } else { - result = checkCustomSchema(value, type); + result = checkCustomSchema(value, type) } - return result; + return result } /** @@ -756,40 +754,40 @@ function checkSchema(value, type) { * @description Test if a value has correct custom type */ function checkCustomSchema(value, typeName) { - var result = true; - var typeDef = store.type[typeName]; - var length = 0; - var i = 0; + let result = true + let typeDef = store.type[typeName] + let length = 0 + let i = 0 if (!hasType(typeDef, 'undefined')) { if (!hasType(value, 'undefined')) { if (typeDef.type === 'array') { - length = value.length; + length = value.length for (i = 0; i < length; i++) { if (!hasType(typeDef.schema, 'undefined')) { - result = exports.isValidSchema(value[i], typeDef.schema); + result = isValidSchema(value[i], typeDef.schema) } else { - result = exports.isValidType(value[i], typeDef.type); + result = isValidType(value[i], typeDef.type) } if (result === false) { - break; + break } } } else { if (!hasType(typeDef.schema, 'undefined')) { - result = exports.isValidSchema(value, typeDef.schema); + result = isValidSchema(value, typeDef.schema) } else { - result = exports.isValidType(value, typeDef.type); + result = isValidType(value, typeDef.type) } } } else { - result = false; + result = false } } else { - result = false; + result = false } - return result; + return result } /** @@ -798,16 +796,16 @@ function checkCustomSchema(value, typeName) { * @description Init the Database stucture */ function initDbStructure() { - $db.collection('_Logger'); - $db.collection('_Schema'); - $db.collection('_GeneratedSchema'); - $db.collection('_Model'); - $db.collection('_GeneratedModel'); - $db.collection('_Behavior'); - $db.collection('_Type'); - $db.collection('_Message'); - $db.collection('_Channel'); - $db.collection('_History'); + $db.collection('_Logger') + $db.collection('_Schema') + $db.collection('_GeneratedSchema') + $db.collection('_Model') + $db.collection('_GeneratedModel') + $db.collection('_Behavior') + $db.collection('_Type') + $db.collection('_Message') + $db.collection('_Channel') + $db.collection('_History') } /** @@ -816,16 +814,16 @@ function initDbStructure() { * @description Create the Database structure (i.e. DatabaseCollection) */ function createDbStructure() { - var modelName = ''; - var modelDef = {}; + let modelName = '' + let modelDef = {} for (modelName in store.generatedModels) { - modelDef = store.generatedModels[modelName]; + modelDef = store.generatedModels[modelName] if ( - typeof $db[modelDef[$mson.NAME]] === 'undefined' && + typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' && modelDef[$mson.CLASS] !== false ) { - $db.collection(modelDef[$mson.NAME]); + $db.collection(modelDef[$mson.NAME]) } } } @@ -836,17 +834,17 @@ function createDbStructure() { * @description Create all the classes of the model */ function createClass() { - var modelName = ''; - var modelDef = {}; + let modelName = '' + let modelDef = {} for (modelName in store.generatedModels) { - modelDef = store.generatedModels[modelName]; + modelDef = store.generatedModels[modelName] if (modelDef[$mson.CLASS] !== false) { $component.create({ model: modelName, - }); + }) if (!modelDef[$mson.CORE]) { - $log.createClass(modelName); + $log.createClass(modelName) } } } @@ -860,7 +858,7 @@ function createClass() { * @description Get the real name of the referenced class */ function getRealClassName(value) { - return value.trim(); + return value.trim() } /** @@ -871,7 +869,7 @@ function getRealClassName(value) { * @description Get the real name of the referenced type */ function getRealTypeName(value) { - return value.replace('{', '').replace('}', '').trim(); + return value.replace('{', '').replace('}', '').trim() } /** @@ -882,12 +880,12 @@ function getRealTypeName(value) { * @description Is the value a custom type */ function isCustomType(value) { - var result = + let result = hasType(value, 'string') && $mson.DEFAULT_TYPES.indexOf(value) === -1 && - !exports.isClassName(value); + !isClassName(value) - return result; + return result } /** @@ -897,7 +895,7 @@ function isCustomType(value) { * @description Is the value reference a type value */ function isTypeReference(value) { - return value.indexOf('{') !== -1; + return value.indexOf('{') !== -1 } /** @@ -908,7 +906,7 @@ function isTypeReference(value) { * @description Is the value a model path */ function isModelPath(value) { - return value.indexOf('.') !== -1; + return value.indexOf('.') !== -1 } /** @@ -919,18 +917,18 @@ function isModelPath(value) { * @description Get the real type of a value */ function getRealType(value) { - var type = ''; + let type = '' if (Array.isArray(value)) { - type = 'array'; + type = 'array' } else { - type = typeof value; + type = typeof value } if (value === 'any') { - type = 'any'; + type = 'any' } - return type; + return type } /** @@ -941,14 +939,14 @@ function getRealType(value) { * @description Get the class name of an object */ function getClassName(obj) { - var result = ''; + let result = '' if (obj && obj.constructor) { - result = obj.constructor.name; + result = obj.constructor.name } else { - result = typeof obj; + result = typeof obj } - return result; + return result } /** @@ -960,7 +958,7 @@ function getClassName(obj) { * @description Check if the value is a valid enum value */ function isValidEnumValue(value, enumValue) { - return enumValue.indexOf(value) !== -1; + return enumValue.indexOf(value) !== -1 } /** @@ -970,30 +968,30 @@ function isValidEnumValue(value, enumValue) { * @description Check if a value has the specified type */ function hasType(value, type) { - var result = true; - var date = null; + let result = true + let date = null switch (type) { case 'array': - result = Array.isArray(value); - break; + result = Array.isArray(value) + break case 'date': if (typeof value === 'string') { - date = new Date(value); - result = !isNaN(date.getDate()); + date = new Date(value) + result = !isNaN(date.getDate()) } else { - result = value instanceof Date; + result = value instanceof Date } - break; + break case 'any': - result = true; - break; + result = true + break default: - result = type === typeof value; - break; + result = type === typeof value + break } - return result; + return result } /** @@ -1005,22 +1003,22 @@ function hasType(value, type) { * @description Check if an attribute of the schema has a specific type */ function checkType(name, id, type) { - var result = false; - var componentSchema = store.generatedModels[id]; - var attributeType = ''; + let result = false + let componentSchema = store.generatedModels[id] + let attributeType = '' if (componentSchema && componentSchema[$mson.NAME]) { - componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]; + componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]] } if (componentSchema) { - attributeType = componentSchema[name.split('.')[0]]; + attributeType = componentSchema[name.split('.')[0]] if (attributeType === type) { - result = true; + result = true } } - return result; + return result } /** @@ -1031,15 +1029,15 @@ function checkType(name, id, type) { * @description Merge two schemas */ function merge(source, target) { - var propName = ''; - var result = target; + let propName = '' + let result = target for (propName in source) { if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) { - result[propName] = source[propName]; + result[propName] = source[propName] } } - return result; + return result } /** @@ -1051,14 +1049,14 @@ function merge(source, target) { * @description Init a configuration depending of the context */ function initConfiguration(name, type, isMethod) { - var result = null; - var typeDef = []; - var schemaDef = []; - var defaultValue = ''; + let result = null + let typeDef = [] + let schemaDef = [] + let defaultValue = '' switch (true) { case name === '=>': - break; + break case typeof type === 'string' && type === 'boolean': if (isMethod) { result = { @@ -1066,16 +1064,16 @@ function initConfiguration(name, type, isMethod) { type: 'boolean', mandatory: false, default: false, - }; + } } else { result = { type: 'boolean', readOnly: false, mandatory: false, default: false, - }; + } } - break; + break case typeof type === 'string' && type === 'string': if (isMethod) { result = { @@ -1083,16 +1081,16 @@ function initConfiguration(name, type, isMethod) { type: 'string', mandatory: false, default: '', - }; + } } else { result = { type: 'string', readOnly: false, mandatory: false, default: '', - }; + } } - break; + break case typeof type === 'string' && type === 'number': if (isMethod) { result = { @@ -1100,16 +1098,16 @@ function initConfiguration(name, type, isMethod) { type: 'number', mandatory: false, default: 0, - }; + } } else { result = { type: 'number', readOnly: false, mandatory: false, default: 0, - }; + } } - break; + break case typeof type === 'string' && type === 'object': if (isMethod) { result = { @@ -1117,16 +1115,16 @@ function initConfiguration(name, type, isMethod) { type: 'object', mandatory: false, default: {}, - }; + } } else { result = { type: 'object', readOnly: false, mandatory: false, default: {}, - }; + } } - break; + break case typeof type === 'string' && type === 'array': if (isMethod) { result = { @@ -1134,16 +1132,16 @@ function initConfiguration(name, type, isMethod) { type: 'array', mandatory: false, default: [], - }; + } } else { result = { type: 'array', readOnly: false, mandatory: false, default: [], - }; + } } - break; + break case typeof type === 'string' && type === 'date': if (isMethod) { result = { @@ -1151,16 +1149,16 @@ function initConfiguration(name, type, isMethod) { type: 'date', mandatory: false, default: '1970-01-01T00:00:00.000Z', - }; + } } else { result = { type: 'date', readOnly: false, mandatory: false, default: '1970-01-01T00:00:00.000Z', - }; + } } - break; + break case typeof type === 'string' && type === 'any': if (isMethod) { result = { @@ -1168,36 +1166,36 @@ function initConfiguration(name, type, isMethod) { type: 'any', mandatory: false, default: null, - }; + } } else { result = { type: 'any', readOnly: false, mandatory: false, default: '', - }; + } } - break; + break // link / custom type case typeof type === 'string': - defaultValue = {}; + defaultValue = {} // case of enumeration - typeDef = $db._Type.find({ + typeDef = $db.collections._Type.find({ name: type, - }); + }) if (typeDef.length) { if (typeDef[0].value) { - defaultValue = typeDef[0].value[0]; + defaultValue = typeDef[0].value[0] } } // case of link - schemaDef = $db._Schema.find({ + schemaDef = $db.collections._Schema.find({ _name: type, - }); + }) if (schemaDef.length) { - defaultValue = ''; + defaultValue = '' } if (isMethod) { @@ -1206,16 +1204,16 @@ function initConfiguration(name, type, isMethod) { type: type, mandatory: false, default: defaultValue, - }; + } } else { result = { type: type, readOnly: false, mandatory: false, default: defaultValue, - }; + } } - break; + break case Array.isArray(type) && type[0] === 'boolean': if (isMethod) { result = { @@ -1223,16 +1221,16 @@ function initConfiguration(name, type, isMethod) { type: ['boolean'], mandatory: false, default: [], - }; + } } else { result = { type: ['boolean'], readOnly: false, mandatory: false, default: [], - }; + } } - break; + break case Array.isArray(type) && type[0] === 'string': if (isMethod) { result = { @@ -1240,16 +1238,16 @@ function initConfiguration(name, type, isMethod) { type: ['string'], mandatory: false, default: '', - }; + } } else { result = { type: ['string'], readOnly: false, mandatory: false, default: '', - }; + } } - break; + break case Array.isArray(type) && type[0] === 'number': if (isMethod) { result = { @@ -1257,16 +1255,16 @@ function initConfiguration(name, type, isMethod) { type: ['number'], mandatory: false, default: [], - }; + } } else { result = { type: ['number'], readOnly: false, mandatory: false, default: [], - }; + } } - break; + break case Array.isArray(type) && type[0] === 'object': if (isMethod) { result = { @@ -1274,16 +1272,16 @@ function initConfiguration(name, type, isMethod) { type: ['object'], mandatory: false, default: [], - }; + } } else { result = { type: ['object'], readOnly: false, mandatory: false, default: [], - }; + } } - break; + break case Array.isArray(type) && type[0] === 'date': if (isMethod) { result = { @@ -1291,16 +1289,16 @@ function initConfiguration(name, type, isMethod) { type: ['date'], mandatory: false, default: [], - }; + } } else { result = { type: ['date'], readOnly: false, mandatory: false, default: [], - }; + } } - break; + break case Array.isArray(type) && type[0] === 'any': if (isMethod) { result = { @@ -1308,16 +1306,16 @@ function initConfiguration(name, type, isMethod) { type: ['any'], mandatory: false, default: [], - }; + } } else { result = { type: ['any'], readOnly: false, mandatory: false, default: [], - }; + } } - break; + break case Array.isArray(type): if (isMethod) { result = { @@ -1325,21 +1323,21 @@ function initConfiguration(name, type, isMethod) { type: type, mandatory: false, default: [], - }; + } } else { result = { type: type, readOnly: false, mandatory: false, default: [], - }; + } } - break; + break default: - break; + break } - return result; + return result } /** @@ -1349,11 +1347,11 @@ function initConfiguration(name, type, isMethod) { * @description Create a full model definition from a model */ function generateConfiguration(model) { - var propName = ''; - var paramPropName = ''; - var methodConf = {}; + let propName = '' + let paramPropName = '' + let methodConf = {} - model = JSON.parse(JSON.stringify(model)); + model = JSON.parse(JSON.stringify(model)) for (propName in model) { if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) { @@ -1361,8 +1359,8 @@ function generateConfiguration(model) { // property type case typeof model[propName] === 'string' || Array.isArray(model[propName]): - model[propName] = initConfiguration(propName, model[propName], false); - break; + model[propName] = initConfiguration(propName, model[propName], false) + break // property configuration case typeof model[propName] === 'object' && @@ -1370,8 +1368,8 @@ function generateConfiguration(model) { model[propName] = merge( model[propName], initConfiguration(propName, model[propName].type || 'any') - ); - break; + ) + break // method / event case typeof model[propName] === 'object' && @@ -1379,13 +1377,13 @@ function generateConfiguration(model) { methodConf = { params: [], result: 'any', - }; + } for (paramPropName in model[propName]) { // parameter type if (typeof model[propName][paramPropName] === 'string') { if (paramPropName === '=>') { - methodConf.result = model[propName][paramPropName]; + methodConf.result = model[propName][paramPropName] } else { methodConf.params.push( initConfiguration( @@ -1393,7 +1391,7 @@ function generateConfiguration(model) { model[propName][paramPropName], true ) - ); + ) } } // parameter configuration @@ -1404,17 +1402,17 @@ function generateConfiguration(model) { paramPropName, model[propName][paramPropName].type || 'any' ) - ); + ) } } - model[propName] = methodConf; - break; + model[propName] = methodConf + break default: - break; + break } } } - return model; + return model } /* Public methods */ @@ -1426,33 +1424,33 @@ function generateConfiguration(model) { * @returns {String} id of the schema * @description Add a new schema to the metamodel */ -exports.schema = function schema(name, schema) { - var id = null; - var result = []; - var schemaName = ''; - var mergedSchema = {}; - var schemas = []; +function schema(name, schema) { + let id = null + let result = [] + let schemaName = '' + let mergedSchema = {} + let schemas = [] if (typeof schema === 'undefined' || Object.keys(schema).length === 0) { if (typeof name === 'string') { - schema = {}; - schema[$mson.NAME] = name; - schemaName = name; + schema = {} + schema[$mson.NAME] = name + schemaName = name } else { - schema = JSON.parse(JSON.stringify(name)); - schemaName = schema[$mson.NAME]; + schema = JSON.parse(JSON.stringify(name)) + schemaName = schema[$mson.NAME] } } else { - schema = JSON.parse(JSON.stringify(schema)); - schema[$mson.NAME] = name; - schemaName = schema[$mson.NAME]; + schema = JSON.parse(JSON.stringify(schema)) + schema[$mson.NAME] = name + schemaName = schema[$mson.NAME] } if (typeof schema[$mson.ID] === 'undefined') { - schema[$mson.ID] = $helper.generateId(); + schema[$mson.ID] = $helper.generateId() } if (typeof schema[$mson.INHERIT] === 'undefined') { - schema[$mson.INHERIT] = ['_Component']; + schema[$mson.INHERIT] = ['_Component'] } /** @@ -1462,99 +1460,99 @@ exports.schema = function schema(name, schema) { * @description remove duplicate parents in the list of parents */ function _removeDuplicate(inherits) { - var filteredList = []; - var list = {}; + let filteredList = [] + let list = {} inherits.forEach(function (name) { - var cleanName = name.trim(); + let cleanName = name.trim() if (typeof list[cleanName] === 'undefined') { - list[cleanName] = cleanName; - filteredList.push(cleanName); + list[cleanName] = cleanName + filteredList.push(cleanName) } - }); + }) - return filteredList; + return filteredList } - schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT]); + schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT]) // check if schema is compliant with the meta meta model - if (exports.isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) { - schemas = $db._Schema.find({ + if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) { + schemas = $db.collections._Schema.find({ _name: schemaName, - }); + }) if (schemas.length) { - mergedSchema = merge(schema, schemas[0]); - $db._Schema.update( + mergedSchema = merge(schema, schemas[0]) + $db.collections._Schema.update( { _name: schemaName, }, mergedSchema - ); - id = schemas[0][$mson.ID]; + ) + id = schemas[0][$mson.ID] } else { - result = $db._Schema.insert(schema); - id = result[0]; + result = $db.collections._Schema.insert(schema) + id = result[0] } } else { - $log.invalidSchema(schema[$mson.NAME]); + $log.invalidSchema(schema[$mson.NAME]) } - return id; -}; + return id +} /** * @method model * @param {String} name name of the model * @param {JSON} model definition of the model - * @returns {String} id of the model + * @returns {String} id of the model * @description Add a new model to the metamodel */ -exports.model = function model(name, model) { - var id = null; - var result = []; - var modelName = ''; - var mergedModel = {}; - var models = []; +function model(name, model) { + let id = null + let result = [] + let modelName = '' + let mergedModel = {} + let models = [] if (typeof model === 'undefined' || Object.keys(model).length === 0) { - model = JSON.parse(JSON.stringify(name)); - modelName = model[$mson.NAME]; + model = JSON.parse(JSON.stringify(name)) + modelName = model[$mson.NAME] } else { - model = JSON.parse(JSON.stringify(model)); - model[$mson.NAME] = name; - model = generateConfiguration(model); - modelName = model[$mson.NAME]; + model = JSON.parse(JSON.stringify(model)) + model[$mson.NAME] = name + model = generateConfiguration(model) + modelName = model[$mson.NAME] } if (typeof model[$mson.ID] === 'undefined') { - model[$mson.ID] = $helper.generateId(); + model[$mson.ID] = $helper.generateId() } // check if model is compliant with the meta meta model - if (exports.isValidObject(model, $mson.MODEL_DEFINITION, false)) { - models = $db._Model.find({ + if (isValidObject(model, $mson.MODEL_DEFINITION, false)) { + models = $db.collections._Model.find({ _name: modelName, - }); + }) if (models.length) { - mergedModel = merge(model, models[0]); - $db._Model.update( + mergedModel = merge(model, models[0]) + $db.collections._Model.update( { _name: modelName, }, mergedModel - ); - id = models[0][$mson.ID]; + ) + id = models[0][$mson.ID] } else { - result = $db._Model.insert(model); - id = result[0]; + result = $db.collections._Model.insert(model) + id = result[0] } } else { - $log.invalidModel(model[$mson.NAME]); + $log.invalidModel(model[$mson.NAME]) } - return id; -}; + return id +} /** * @method type @@ -1563,60 +1561,60 @@ exports.model = function model(name, model) { * @returns {String} id of the type * @description Add a new type */ -exports.type = function type(name, type) { - var id = null; - var result = []; - var typeName = ''; - var typeDef = {}; +function type(name, type) { + let id = null + let result = [] + let typeName = '' + let typeDef = {} if (typeof type === 'undefined' || Object.keys(type).length === 0) { - typeDef = JSON.parse(JSON.stringify(name)); - typeName = typeDef.name; + typeDef = JSON.parse(JSON.stringify(name)) + typeName = typeDef.name } else { if (Array.isArray(type)) { - type = JSON.parse(JSON.stringify(type)); - typeDef.value = type; - typeDef.name = name; - typeDef.type = typeof type[0] || 'any'; - typeName = typeDef.name; + type = JSON.parse(JSON.stringify(type)) + typeDef.value = type + typeDef.name = name + typeDef.type = typeof type[0] || 'any' + typeName = typeDef.name } else { - type = JSON.parse(JSON.stringify(type)); - typeDef.schema = generateConfiguration(type); - typeDef.name = name; - typeDef.type = 'object'; - typeName = typeDef.name; + type = JSON.parse(JSON.stringify(type)) + typeDef.schema = generateConfiguration(type) + typeDef.name = name + typeDef.type = 'object' + typeName = typeDef.name } } if (typeof typeDef[$mson.ID] === 'undefined') { - typeDef[$mson.ID] = $helper.generateId(); + typeDef[$mson.ID] = $helper.generateId() } // check if type is compliant with the meta meta model - if (exports.isValidObject(typeDef, $mson.TYPE_DEFINITION)) { - result = $db._Type.insert(typeDef); - id = result[0]; + if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) { + result = $db.collections._Type.insert(typeDef) + id = result[0] } else { - $log.invalidTypeDefinition(typeName); + $log.invalidTypeDefinition(typeName) } - return id; -}; + return id +} /** * @method init * @description Init the metamodel */ -exports.init = function init() { - exports.clear(); - initDbStructure(); -}; +function init() { + clear() + initDbStructure() +} /** * @method clear * @description Remove the data of the metamodel from the memory */ -exports.clear = function clear() { +function clear() { store = { inheritance: {}, inheritanceTree: {}, @@ -1626,23 +1624,23 @@ exports.clear = function clear() { generatedModels: {}, states: {}, type: {}, - }; -}; + } +} /** * @method create * @description Create the metamodel */ -exports.create = function create() { - loadInMemory(); - createInheritanceTree(); - generateSchemas(); - generateModels(); - checkModels(); - getStates(); - createDbStructure(); - createClass(); -}; +function create() { + loadInMemory() + createInheritanceTree() + generateSchemas() + generateModels() + checkModels() + getStates() + createDbStructure() + createClass() +} /** * @method isEvent @@ -1651,9 +1649,9 @@ exports.create = function create() { * @returns {Boolean} true if the attribute is an event * @description Check if an attribute of the schema is an event */ -exports.isEvent = function isEvent(name, id) { - return checkType(name, id, $mson.EVENT_TYPE); -}; +function isEvent(name, id) { + return checkType(name, id, $mson.EVENT_TYPE) +} /** * @method isProperty @@ -1662,9 +1660,9 @@ exports.isEvent = function isEvent(name, id) { * @returns {Boolean} true if the attribute is a property * @description Check if an attribute of the schema is a property */ -exports.isProperty = function isProperty(name, id) { - return checkType(name, id, $mson.PROPERTY_TYPE); -}; +function isProperty(name, id) { + return checkType(name, id, $mson.PROPERTY_TYPE) +} /** * @method isLink @@ -1673,9 +1671,9 @@ exports.isProperty = function isProperty(name, id) { * @returns {Boolean} true if the attribute is a link * @description Check if an attribute of the schema is a link */ -exports.isLink = function isLink(name, id) { - return checkType(name, id, $mson.LINK_TYPE); -}; +function isLink(name, id) { + return checkType(name, id, $mson.LINK_TYPE) +} /** * @method isCollection @@ -1684,9 +1682,9 @@ exports.isLink = function isLink(name, id) { * @returns {Boolean} true if the attribute is a collection * @description Check if an attribute of the schema is a collection */ -exports.isCollection = function isCollection(name, id) { - return checkType(name, id, $mson.COLLECTION_TYPE); -}; +function isCollection(name, id) { + return checkType(name, id, $mson.COLLECTION_TYPE) +} /** * @method isMethod @@ -1695,9 +1693,9 @@ exports.isCollection = function isCollection(name, id) { * @returns {Boolean} true if the attribute is a method * @description Check if an attribute of the schema is a method */ -exports.isMethod = function isMethod(name, id) { - return checkType(name, id, $mson.METHOD_TYPE); -}; +function isMethod(name, id) { + return checkType(name, id, $mson.METHOD_TYPE) +} /** * @method isStructure @@ -1706,25 +1704,25 @@ exports.isMethod = function isMethod(name, id) { * @returns {Boolean} true if the property is a structure * @description Check if an attribute of the schema is a structure */ -exports.isStructure = function isStructure(path, modelName) { - var result = false; - var structure = null; - var type = ''; +function isStructure(path, modelName) { + let result = false + let structure = null + let type = '' - type = exports.getModelPathType(modelName, path); + type = getModelPathType(modelName, path) if (Array.isArray(structure)) { - structure = exports.getType(type[0]); + structure = getType(type[0]) } else { - structure = exports.getType(type); + structure = getType(type) } if (structure && structure.schema) { - result = true; + result = true } - return result; -}; + return result +} /** * @method isValidState @@ -1733,26 +1731,26 @@ exports.isStructure = function isStructure(path, modelName) { * @returns {Boolean} true if the name is a correct state for the component * @description Check if the name is a correct state for the component */ -exports.isValidState = function isValidState(name, id) { - var result = false; - var componentSchema = store.generatedModels[id]; - var state = {}; +function isValidState(name, id) { + let result = false + let componentSchema = store.generatedModels[id] + let state = {} if (isModelPath(name)) { - result = exports.isValidModelPath(id, name); + result = isValidModelPath(id, name) } else { if (componentSchema && componentSchema[$mson.NAME]) { - componentSchema = store.generatedModels[componentSchema[$mson.NAME]]; + componentSchema = store.generatedModels[componentSchema[$mson.NAME]] } - state = store.states[componentSchema[$mson.NAME]]; + state = store.states[componentSchema[$mson.NAME]] if (Array.isArray(state)) { - result = state.indexOf(name) !== -1; + result = state.indexOf(name) !== -1 } } - return result; -}; + return result +} /** * @method isValidType @@ -1762,8 +1760,8 @@ exports.isValidState = function isValidState(name, id) { * @returns {Boolean} true if the object is compliant with the type * @description Check if a value is compliant with a type */ -exports.isValidType = function isValidType(value, typeName, isDocument) { - var result = true; +function isValidType(value, typeName, isDocument) { + let result = true /** * @method _isValidCustomType @@ -1773,17 +1771,17 @@ exports.isValidType = function isValidType(value, typeName, isDocument) { * @description Check if a value has the correct type */ function _isValidCustomType(value, typeName) { - var typeDef = store.type[typeName]; - var result = true; + let typeDef = store.type[typeName] + let result = true if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) { - result = false; + result = false } if (result === false) { - $log.invalidEnumValue(value, typeName); + $log.invalidEnumValue(value, typeName) } - return result; + return result } /** @@ -1796,89 +1794,86 @@ exports.isValidType = function isValidType(value, typeName, isDocument) { * @description Check if an object is compliant with a type */ function _isValidType(value, typeName, isDocument) { - var isValid = true; - var realType = ''; - var i = 0; - var length = 0; + let isValid = true + let realType = '' + let i = 0 + let length = 0 - realType = getRealType(typeName); + realType = getRealType(typeName) switch (realType) { case 'string': - isValid = hasType(value, typeName); - break; + isValid = hasType(value, typeName) + break case 'array': if (Array.isArray(value)) { - length = value.length; + length = value.length for (i = 0; i < length; i++) { switch (true) { case isCustomType(typeName[0]): - isValid = checkCustomSchema(value[i], typeName[0]); - break; - case exports.isClassName(typeName[0]): + isValid = checkCustomSchema(value[i], typeName[0]) + break + case isClassName(typeName[0]): if (!isDocument) { if ( value[i] !== '' && value[i] !== null && typeof value[i] !== 'string' ) { - isValid = exports.inheritFrom( - getClassName(value[i]), - typeName[0] - ); + isValid = inheritFrom(getClassName(value[i]), typeName[0]) } } else { - isValid = false; + isValid = false } - break; + break default: - isValid = hasType(value[i], typeName[0]); - break; + isValid = hasType(value[i], typeName[0]) + break } } } else { - isValid = false; + isValid = false } - break; + break default: - break; + break } - return isValid; + return isValid } switch (true) { case isCustomType(typeName): - result = checkCustomSchema(value, typeName); + result = checkCustomSchema(value, typeName) if (!result) { if (store.type[typeName]) { - $log.invalidEnumType(value, typeName, store.type[typeName].type); + $log.invalidEnumType(value, typeName, store.type[typeName].type) } else { - $log.invalidEnumType(value, typeName); + $log.invalidEnumType(value, typeName) } } if (result) { - result = _isValidCustomType(value, typeName); + result = _isValidCustomType(value, typeName) } - break; - case exports.isClassName(typeName): + break + case isClassName(typeName): if (!isDocument) { if (value !== null && typeof value !== 'string') { - result = exports.inheritFrom(getClassName(value), typeName); + result = inheritFrom(getClassName(value), typeName) } else { if (value !== null) { - result = false; + result = false } } } - break; + break default: - result = _isValidType(value, typeName, isDocument); - break; + result = _isValidType(value, typeName, isDocument) + break } - return result; -}; + return result +} /** * @method isValidEnum @@ -1887,8 +1882,8 @@ exports.isValidType = function isValidType(value, typeName, isDocument) { * @returns {Boolean} true if the object is compliant with the enum * @description Check if a value is compliant with a type enum. */ -exports.isValidEnum = function isValidEnum(value, schema) { - var result = true; +function isValidEnum(value, schema) { + let result = true /** * @method _isInstanceOf @@ -1897,35 +1892,35 @@ exports.isValidEnum = function isValidEnum(value, schema) { * @private Check if the component has for class name className */ function _isInstanceOf(component, className) { - var result = false; - var componentClassName = ''; + let result = false + let componentClassName = '' - componentClassName = component.constructor.name; + componentClassName = component.constructor.name if (componentClassName === 'Function') { - componentClassName = component.name; + componentClassName = component.name } - result = componentClassName === className; + result = componentClassName === className - return result; + return result } - if (exports.isClassName(schema.type)) { + if (isClassName(schema.type)) { result = _isInstanceOf($component.get(value), getRealClassName(schema.type)) && - schema.value.indexOf(value) !== -1; + schema.value.indexOf(value) !== -1 if (!result) { - $log.invalidEnumValue(value, schema.type); + $log.invalidEnumValue(value, schema.type) } } else { - result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1; + result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1 if (!result) { - $log.invalidEnumValue(value, schema.name); + $log.invalidEnumValue(value, schema.name) } } - return result; -}; + return result +} /** * @method isValidSchema @@ -1936,16 +1931,16 @@ exports.isValidEnum = function isValidEnum(value, schema) { * Use it to test if a schema is compliant with a schema * it is supposed to validate. */ -exports.isValidSchema = function isValidSchema(object, schema) { - var fieldName = ''; - var field = null; - var result = true; - var mandatory = true; - var typeSchema = ''; - var typeRef = ''; - var realType = ''; - var length = 0; - var i = 0; +function isValidSchema(object, schema) { + let fieldName = '' + let field = null + let result = true + let mandatory = true + let typeSchema = '' + let typeRef = '' + let realType = '' + let length = 0 + let i = 0 /** * @method _isValidClassName @@ -1954,44 +1949,44 @@ exports.isValidSchema = function isValidSchema(object, schema) { * @description Check if a field is compliant with the type of the class name */ function _isValidClassName() { - var isValid = true; - var enumValue = []; + let isValid = true + let enumValue = [] - typeRef = getClassName(typeSchema); - typeRef = object[typeRef]; + typeRef = getClassName(typeSchema) + typeRef = object[typeRef] if (isCustomType(typeRef)) { if (store.type[typeRef]) { if (store.type[typeRef].schema) { - isValid = isValidSchema(field, store.type[typeRef].schema); + isValid = isValidSchema(field, store.type[typeRef].schema) } else { // check type - isValid = hasType(field, store.type[typeRef].type); + isValid = hasType(field, store.type[typeRef].type) // check value - enumValue = store.type[typeRef].value; + enumValue = store.type[typeRef].value if (enumValue) { - isValid = isValidEnumValue(field, enumValue); + isValid = isValidEnumValue(field, enumValue) } } } else { - isValid = false; + isValid = false } } else { if (typeRef === 'array') { - isValid = Array.isArray(field); + isValid = Array.isArray(field) } else { - if (exports.isClassName(typeRef)) { - isValid = hasType(field, 'object') || hasType(field, 'string'); + if (isClassName(typeRef)) { + isValid = hasType(field, 'object') || hasType(field, 'string') // TODO maybe have a more strict validation than just a type checking } else { - isValid = hasType(field, typeRef); + isValid = hasType(field, typeRef) } } } if (!isValid) { - $log.invalidPropertyType(fieldName, typeRef, field); + $log.invalidPropertyType(fieldName, typeRef, field) } - return isValid; + return isValid } /** @@ -2001,60 +1996,60 @@ exports.isValidSchema = function isValidSchema(object, schema) { * @description Check if a field is compliant with the type of the references type */ function _isValidTypeReference() { - var isValid = true; - var enumValue = []; + let isValid = true + let enumValue = [] - typeRef = getRealTypeName(typeSchema); - typeRef = object[typeRef]; + typeRef = getRealTypeName(typeSchema) + typeRef = object[typeRef] switch (true) { case typeof typeRef === 'string': if (isCustomType(typeRef)) { if (store.type[typeRef]) { if (store.type[typeRef].schema) { - isValid = isValidSchema(field, store.type[typeRef].schema); + isValid = isValidSchema(field, store.type[typeRef].schema) } else { // check type - isValid = hasType(field, store.type[typeRef].type); + isValid = hasType(field, store.type[typeRef].type) // check value - enumValue = store.type[typeRef].value; + enumValue = store.type[typeRef].value if (enumValue) { - isValid = isValidEnumValue(field, enumValue); + isValid = isValidEnumValue(field, enumValue) } } } else { - isValid = false; + isValid = false } } else { if (typeRef === 'array') { - isValid = Array.isArray(field); + isValid = Array.isArray(field) } else { - if (exports.isClassName(typeRef)) { - isValid = hasType(field, 'object') || hasType(field, 'string'); + if (isClassName(typeRef)) { + isValid = hasType(field, 'object') || hasType(field, 'string') // TODO maybe have a more strict validation than just a type checking } else { - isValid = hasType(field, typeRef); + isValid = hasType(field, typeRef) } } } - break; + break case Array.isArray(typeRef): if (!Array.isArray(field)) { - isValid = false; + isValid = false } - break; + break default: - isValid = false; - break; + isValid = false + break } if (!isValid) { - $log.invalidPropertyType(fieldName, typeRef, field); + $log.invalidPropertyType(fieldName, typeRef, field) } - return isValid; + return isValid } /** @@ -2064,97 +2059,97 @@ exports.isValidSchema = function isValidSchema(object, schema) { * @description Check if a field is compliant with a type */ function _isValidType() { - var isValid = true; + let isValid = true - realType = getRealType(typeSchema); + realType = getRealType(typeSchema) switch (realType) { case 'string': if (isCustomType(realType)) { - isValid = isValidSchema(field, typeSchema); + isValid = isValidSchema(field, typeSchema) } else { if (!hasType(field, typeSchema)) { - $log.invalidPropertyType(fieldName, typeSchema, field); - isValid = false; - break; + $log.invalidPropertyType(fieldName, typeSchema, field) + isValid = false + break } } - break; + break case 'array': if (Array.isArray(field)) { - length = field.length; + length = field.length for (i = 0; i < length; i++) { if (isCustomType(typeSchema[0])) { isValid = isValidSchema( field[i], store.type[typeSchema[0]].schema - ); + ) } else { if (!hasType(field[i], typeSchema[0])) { - $log.invalidPropertyType(fieldName, typeSchema[0], field[i]); - isValid = false; - break; + $log.invalidPropertyType(fieldName, typeSchema[0], field[i]) + isValid = false + break } } } } else { - isValid = false; + isValid = false } - break; + break default: - break; + break } - return isValid; + return isValid } // type if (hasType(object, 'object')) { for (fieldName in object) { - field = object[fieldName]; + field = object[fieldName] if (hasType(schema[fieldName], 'undefined')) { - $log.unknownProperty(fieldName, schema); - return false; + $log.unknownProperty(fieldName, schema) + return false } else { - typeSchema = schema[fieldName].type; + typeSchema = schema[fieldName].type } switch (true) { - case exports.isClassName(typeSchema): - result = result && _isValidClassName(); - break; + case isClassName(typeSchema): + result = result && _isValidClassName() + break case isTypeReference(typeSchema): - result = result && _isValidTypeReference(); - break; + result = result && _isValidTypeReference() + break default: - result = result && _isValidType(); - break; + result = result && _isValidType() + break } if (!result) { - break; + break } } // mandatory for (fieldName in schema) { - field = schema[fieldName]; - mandatory = field.mandatory; + field = schema[fieldName] + mandatory = field.mandatory if ( mandatory === true && hasType(object[fieldName], 'undefined') && object[fieldName] !== undefined ) { - $log.missingProperty(fieldName); - result = false; - break; + $log.missingProperty(fieldName) + result = false + break } } } else { - result = false; - $log.invalidPropertyFormat(object); + result = false + $log.invalidPropertyFormat(object) } - return result; -}; + return result +} /** * @method isValidObject @@ -2167,28 +2162,23 @@ exports.isValidSchema = function isValidSchema(object, schema) { * Use it to test if the constructor of an object is compliant * with the definition of the class. */ -exports.isValidObject = function isValidObject( - object, - schema, - strict, - cleanRef -) { - var fieldName = ''; - var field = null; - var result = true; - var mandatory = true; - var typeSchema = ''; - var typeRef = ''; - var realType = ''; - var length = 0; - var i = 0; +function isValidObject(object, schema, strict, cleanRef) { + let fieldName = '' + let field = null + let result = true + let mandatory = true + let typeSchema = '' + let typeRef = '' + let realType = '' + let length = 0 + let i = 0 if (hasType(strict, 'undefined')) { - strict = true; + strict = true } if (hasType(cleanRef, 'undefined')) { - cleanRef = false; + cleanRef = false } /** @@ -2200,26 +2190,26 @@ exports.isValidObject = function isValidObject( * @description Check if a field is compliant with a custom type */ function _isValidCustomType(field, typeSchema) { - var isValid = true; - var realType = ''; + let isValid = true + let realType = '' - realType = store.type[typeSchema]; + realType = store.type[typeSchema] if (realType) { switch (true) { case !hasType(realType.schema, 'undefined'): - isValid = isValidObject(field, realType.schema, strict, cleanRef); - break; + isValid = isValidObject(field, realType.schema, strict, cleanRef) + break case !hasType(realType.value, 'undefined'): - isValid = exports.isValidEnum(field, realType); - break; + isValid = isValidEnum(field, realType) + break default: - isValid = exports.isValidType(field, realType.type); - break; + isValid = isValidType(field, realType.type) + break } } else { - isValid = false; + isValid = false } - return isValid; + return isValid } /** @@ -2231,25 +2221,25 @@ exports.isValidObject = function isValidObject( * @description Check if a field is compliant with the type of the class name */ function _isValidClassName(field, typeSchema) { - var isValid = true; - var comp = null; - var isComponent = false; + let isValid = true + let comp = null + let isComponent = false - typeRef = getRealClassName(typeSchema); + typeRef = getRealClassName(typeSchema) if (field && field.id) { - comp = field; - isComponent = true; + comp = field + isComponent = true } else { - comp = $component.get(field); + comp = $component.get(field) } if (!hasType(comp, 'undefined')) { - if (!exports.inheritFrom(comp.constructor.name, typeRef)) { - isValid = false; - $log.invalidType(fieldName, field, typeRef); + if (!inheritFrom(comp.constructor.name, typeRef)) { + isValid = false + $log.invalidType(fieldName, field, typeRef) } else { if (isComponent && cleanRef) { - object[fieldName] = comp.id(); // store the id instead the full object + object[fieldName] = comp.id() // store the id instead the full object } } } else { @@ -2261,12 +2251,12 @@ exports.isValidObject = function isValidObject( case hasType(field, 'string') && field !== '': // uncomment line if we need this log // $log.canNotYetValidate(field, typeRef); - break; + break default: - break; + break } } - return isValid; + return isValid } /** @@ -2278,68 +2268,68 @@ exports.isValidObject = function isValidObject( * @description Check if a field is compliant with a type */ function _isValidType(field, typeSchema) { - var isValid = true; - var date = null; - var typeArray = ''; + let isValid = true + let date = null + let typeArray = '' - realType = getRealType(typeSchema); + realType = getRealType(typeSchema) switch (realType) { case 'any': - break; + break case 'string': if (isCustomType(realType)) { - isValid = isValidObject(field, typeSchema, strict, cleanRef); + isValid = isValidObject(field, typeSchema, strict, cleanRef) } else { if (typeSchema === 'array') { if (getRealType(field) !== 'array') { - $log.invalidPropertyType(fieldName, typeSchema, field); - isValid = false; - break; + $log.invalidPropertyType(fieldName, typeSchema, field) + isValid = false + break } } else { if (typeSchema === 'date') { - date = new Date(field); - isValid = !isNaN(date.getDate()); + date = new Date(field) + isValid = !isNaN(date.getDate()) if (!isValid) { - $log.invalidPropertyType(fieldName, typeSchema, field); - break; + $log.invalidPropertyType(fieldName, typeSchema, field) + break } } else { if ( getRealType(field) !== typeSchema && getRealType(field) !== 'any' ) { - $log.invalidPropertyType(fieldName, typeSchema, field); - isValid = false; - break; + $log.invalidPropertyType(fieldName, typeSchema, field) + isValid = false + break } } } } - break; + break case 'array': if (Array.isArray(field)) { - length = field.length; - typeArray = typeSchema[0]; + length = field.length + typeArray = typeSchema[0] for (i = 0; i < length; i++) { if (isCustomType(typeArray)) { - isValid = _isValidCustomType(field[i], typeArray); + isValid = _isValidCustomType(field[i], typeArray) } else { - if (!exports.isClassName(typeArray)) { + if (!isClassName(typeArray)) { if ( getRealType(field[i]) !== typeArray && typeArray !== 'any' ) { - $log.invalidPropertyType(fieldName, typeArray, field[i]); - isValid = false; - break; + $log.invalidPropertyType(fieldName, typeArray, field[i]) + isValid = false + break } } else { if (getRealType(field[i]) === 'string') { // Case of an import of a system if ($component.get(field[i])) { if ( - !exports.inheritFrom( + !inheritFrom( getClassName($component.get(field[i])), getRealClassName(typeArray) ) @@ -2348,9 +2338,9 @@ exports.isValidObject = function isValidObject( JSON.stringify(field[i]), getRealClassName(typeArray), getClassName($component.get(field[i])) - ); - isValid = false; - break; + ) + isValid = false + break } } else { if (field[i] !== '') { @@ -2363,7 +2353,7 @@ exports.isValidObject = function isValidObject( } } else { if ( - !exports.inheritFrom( + !inheritFrom( getClassName(field[i]), getRealClassName(typeArray) ) @@ -2372,12 +2362,12 @@ exports.isValidObject = function isValidObject( JSON.stringify(field[i]), getRealClassName(typeArray), getClassName(field[i]) - ); - isValid = false; - break; + ) + isValid = false + break } else { if (cleanRef) { - field[i] = field[i].id(); // store the id instead the full object + field[i] = field[i].id() // store the id instead the full object } } } @@ -2385,27 +2375,27 @@ exports.isValidObject = function isValidObject( } } } else { - isValid = false; - $log.invalidType(fieldName, field, 'array'); + isValid = false + $log.invalidType(fieldName, field, 'array') } - break; + break default: - isValid = false; - $log.unknownType(field); - break; + isValid = false + $log.unknownType(field) + break } - return isValid; + return isValid } // check if object if (!hasType(object, 'object')) { - result = false; - $log.invalidConfiguration(object, 'object'); + result = false + $log.invalidConfiguration(object, 'object') } // type for (fieldName in object) { - field = object[fieldName]; + field = object[fieldName] if ( !hasType(schema[fieldName], 'undefined') || @@ -2414,51 +2404,51 @@ exports.isValidObject = function isValidObject( ) { switch (true) { case fieldName === $mson.CORE: - typeSchema = 'boolean'; - break; + typeSchema = 'boolean' + break case fieldName === $mson.ID: - typeSchema = 'string'; - break; + typeSchema = 'string' + break default: - typeSchema = schema[fieldName].type; - break; + typeSchema = schema[fieldName].type + break } } else { if (strict) { - $log.unknownProperty(fieldName, schema); - return false; + $log.unknownProperty(fieldName, schema) + return false } else { - continue; + continue } } switch (true) { case isCustomType(typeSchema): - result = result && _isValidCustomType(field, typeSchema); - break; - case exports.isClassName(typeSchema): - result = result && _isValidClassName(field, typeSchema); - break; + result = result && _isValidCustomType(field, typeSchema) + break + case isClassName(typeSchema): + result = result && _isValidClassName(field, typeSchema) + break default: - result = result && _isValidType(field, typeSchema); - break; + result = result && _isValidType(field, typeSchema) + break } } // mandatory for (fieldName in schema) { - field = schema[fieldName]; - mandatory = field.mandatory; + field = schema[fieldName] + mandatory = field.mandatory if (object && hasType(object[fieldName], 'undefined')) { if (mandatory === true) { - $log.missingProperty(fieldName); - result = false; + $log.missingProperty(fieldName) + result = false } } } - return result; -}; + return result +} /** * Prepare the object in order to be compliant with the schema. @@ -2466,26 +2456,26 @@ exports.isValidObject = function isValidObject( * @param {Object} object object to prepate * @param {Object} schema schema that validates the object */ -exports.prepareObject = function prepareObject(object, schema) { - var fieldName = ''; - var field = null; - var mandatory = true; - var defaultValue = ''; +function prepareObject(object, schema) { + let fieldName = '' + let field = null + let mandatory = true + let defaultValue = '' - schema = JSON.parse(JSON.stringify(schema)); + schema = JSON.parse(JSON.stringify(schema)) // mandatory & default value for (fieldName in schema) { - field = schema[fieldName]; - mandatory = field.mandatory; - defaultValue = field.default; + field = schema[fieldName] + mandatory = field.mandatory + defaultValue = field.default if (hasType(object[fieldName], 'undefined')) { if (mandatory === false && !hasType(defaultValue, 'undefined')) { - object[fieldName] = defaultValue; + object[fieldName] = defaultValue } } } -}; +} /** * @method getSchema @@ -2493,14 +2483,14 @@ exports.prepareObject = function prepareObject(object, schema) { * @returns {Object} the schema * @description Get a schema */ -exports.getSchema = function getSchema(name) { - var result = null; +function getSchema(name) { + let result = null if (store.generatedSchemas[name]) { - result = store.generatedSchemas[name]; + result = store.generatedSchemas[name] } - return result; -}; + return result +} /** * @method getModel @@ -2508,14 +2498,14 @@ exports.getSchema = function getSchema(name) { * @returns {Object} the model * @description Get a model */ -exports.getModel = function getModel(name) { - var result = null; +function getModel(name) { + let result = null if (store.generatedModels[name]) { - result = store.generatedModels[name]; + result = store.generatedModels[name] } - return result; -}; + return result +} /** * @method getType @@ -2523,14 +2513,14 @@ exports.getModel = function getModel(name) { * @returns {Object} the type * @description Get a type */ -exports.getType = function getType(name) { - var result = null; +function getType(name) { + let result = null if (store.type[name] && store.type[name]) { - result = JSON.parse(JSON.stringify(store.type[name])); + result = JSON.parse(JSON.stringify(store.type[name])) } - return result; -}; + return result +} /** * @method getModelPathType @@ -2539,50 +2529,50 @@ exports.getType = function getType(name) { * @returns {Object} the type * @description Get the type of a model path */ -exports.getModelPathType = function getModelPathType(model, path) { - var result = null; - var subpaths = []; - var subpath = ''; - var i = 0; - var length = 0; - var structure = ''; +function getModelPathType(model, path) { + let result = null + let subpaths = [] + let subpath = '' + let i = 0 + let length = 0 + let structure = '' - subpaths = path.split('.'); - length = subpaths.length; + subpaths = path.split('.') + length = subpaths.length for (i = 0; i < length; i++) { - subpath = subpaths[i]; - subpath = subpath.split('[')[0]; + subpath = subpaths[i] + subpath = subpath.split('[')[0] if (i === 0) { - result = exports.getModel(model)[subpath].type; + result = getModel(model)[subpath].type } else { if (Array.isArray(result)) { - result = result[0]; + result = result[0] } if (isCustomType(result)) { - structure = exports.getType(result); + structure = getType(result) switch (true) { case typeof structure.schema !== 'undefined': if (!structure.schema[subpath]) { - $log.unknownPath(path, subpath); + $log.unknownPath(path, subpath) } else { - result = structure.schema[subpath].type; + result = structure.schema[subpath].type } - break; + break case typeof structure.type !== 'undefined': - result = structure.type; - break; + result = structure.type + break default: - $log.invalidState(model, path); - break; + $log.invalidState(model, path) + break } } } } - return result; -}; + return result +} /** * @method isValidModelPath @@ -2591,44 +2581,44 @@ exports.getModelPathType = function getModelPathType(model, path) { * @returns {Boolean} true if the path is valid for the model * @description Check if a path is valid model path */ -exports.isValidModelPath = function isValidModelPath(model, path) { - var result = true; - var type = null; - var subpaths = []; - var subpath = ''; - var i = 0; - var length = 0; - var structure = ''; - - subpaths = path.split('.'); - length = subpaths.length; +function isValidModelPath(model, path) { + let result = true + let type = null + let subpaths = [] + let subpath = '' + let i = 0 + let length = 0 + let structure = '' + + subpaths = path.split('.') + length = subpaths.length for (i = 0; i < length; i++) { - subpath = subpaths[i]; - subpath = subpath.split('[')[0]; + subpath = subpaths[i] + subpath = subpath.split('[')[0] if (i === 0) { - type = exports.getModel(model)[subpath].type; + type = getModel(model)[subpath].type if (!type) { - result = false; + result = false } } else { if (Array.isArray(result)) { - type = type[0]; + type = type[0] } if (isCustomType(type)) { - structure = exports.getType(type); + structure = getType(type) if (structure.schema && structure.schema[subpath]) { - type = structure.schema[subpath].type; + type = structure.schema[subpath].type if (!type) { - result = false; + result = false } } } } } - return result; -}; + return result +} /** * @method get @@ -2636,17 +2626,17 @@ exports.isValidModelPath = function isValidModelPath(model, path) { * @returns {Array} id id of the parents * @description Get parents of a schema if any */ -exports.getParents = function getParents(id) { - var result = []; +function getParents(id) { + let result = [] if (!store.inheritanceTree[id]) { - result = []; + result = [] } else { - result = store.inheritanceTree[id].slice(); + result = store.inheritanceTree[id].slice() } - return result; -}; + return result +} /** * @method inheritFrom @@ -2655,11 +2645,11 @@ exports.getParents = function getParents(id) { * @returns {Boolean} true if the component inherit from the specific class name * @description Check if a class inherits from another one */ -exports.inheritFrom = function inheritFrom(name, parentName) { - var result = false; - var parents = []; - var i = 0; - var length = 0; +function inheritFrom(name, parentName) { + let result = false + let parents = [] + let i = 0 + let length = 0 /** * @method _searchParent @@ -2670,49 +2660,49 @@ exports.inheritFrom = function inheritFrom(name, parentName) { * @description Check if a class inherits from another one */ function _searchParent(className, ancestorName) { - var isAncestor = false; - var parents = []; - var i = 0; - var length = 0; + let isAncestor = false + let parents = [] + let i = 0 + let length = 0 - parents = exports.getParents(className); + parents = getParents(className) if (parents.length !== 0) { if (parents.indexOf(ancestorName) !== -1) { - isAncestor = true; + isAncestor = true } else { for (i = 0; i < length; i++) { - isAncestor = _searchParent(parents[i], ancestorName); + isAncestor = _searchParent(parents[i], ancestorName) if (isAncestor) { - break; + break } } } } - return isAncestor; + return isAncestor } if (name !== parentName) { - parents = exports.getParents(name); - length = parents.length; + parents = getParents(name) + length = parents.length if (parents.length !== 0) { if (parents.indexOf(parentName) !== -1) { - result = true; + result = true } else { for (i = 0; i < length; i++) { - result = _searchParent(parents[i], parentName); + result = _searchParent(parents[i], parentName) if (result) { - break; + break } } } } } else { - result = true; + result = true } - return result; -}; + return result +} /** * @method isClassName @@ -2720,16 +2710,45 @@ exports.inheritFrom = function inheritFrom(name, parentName) { * @returns {Boolean} true if the name is a class name * @description Is the value a class name */ -exports.isClassName = function isClassName(value) { - var result = hasType(value, 'string'); +function isClassName(value) { + let result = hasType(value, 'string') if (result) { if (Object.keys(store.generatedModels).length > 0) { - result = typeof store.generatedModels[value] !== 'undefined'; + result = typeof store.generatedModels[value] !== 'undefined' } else { - result = false; + result = false } } - return result; -}; + return result +} + +export default { + schema, + model, + type, + init, + clear, + create, + isEvent, + isProperty, + isLink, + isCollection, + isMethod, + isStructure, + isValidState, + isValidType, + isValidEnum, + isValidSchema, + isValidObject, + prepareObject, + getSchema, + getModel, + getType, + getModelPathType, + isValidModelPath, + getParents, + inheritFrom, + isClassName, +} diff --git a/src/mson.js b/src/mson.js index 656f21d..71bd2f9 100644 --- a/src/mson.js +++ b/src/mson.js @@ -23,33 +23,31 @@ * @description This module contains all the mson definition. */ -'use strict'; +const ID = '_id' +const NAME = '_name' +const DESCRIPTION = '_description' +const INHERIT = '_inherit' +const CLASS = '_class' +const CORE = '_core' -exports.ID = '_id'; -exports.NAME = '_name'; -exports.DESCRIPTION = '_description'; -exports.INHERIT = '_inherit'; -exports.CLASS = '_class'; -exports.CORE = '_core'; - -exports.INTERNAL_NAMES = [ +const INTERNAL_NAMES = [ '_id', '_name', '_inherit', '_description', '_class', '_core', -]; +] -exports.PROPERTY_TYPE = 'property'; -exports.COLLECTION_TYPE = 'collection'; -exports.LINK_TYPE = 'link'; -exports.METHOD_TYPE = 'method'; -exports.EVENT_TYPE = 'event'; +const PROPERTY_TYPE = 'property' +const COLLECTION_TYPE = 'collection' +const LINK_TYPE = 'link' +const METHOD_TYPE = 'method' +const EVENT_TYPE = 'event' -exports.INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']; +const INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event'] -exports.DEFAULT_TYPES = [ +const DEFAULT_TYPES = [ 'boolean', 'string', 'number', @@ -58,9 +56,9 @@ exports.DEFAULT_TYPES = [ 'array', 'date', 'any', -]; +] -exports.SCHEMA_DEFINITION = { +const SCHEMA_DEFINITION = { _id: { type: 'string', mandatory: true, @@ -86,9 +84,9 @@ exports.SCHEMA_DEFINITION = { type: 'string', mandatory: false, }, -}; +} -exports.MODEL_DEFINITION = { +const MODEL_DEFINITION = { _id: { type: 'string', mandatory: true, @@ -113,9 +111,9 @@ exports.MODEL_DEFINITION = { type: 'string', mandatory: false, }, -}; +} -exports.TYPE_DEFINITION = { +const TYPE_DEFINITION = { _id: { type: 'string', mandatory: true, @@ -144,4 +142,24 @@ exports.TYPE_DEFINITION = { type: 'string', mandatory: false, }, -}; +} + +export default { + ID, + NAME, + DESCRIPTION, + INHERIT, + CLASS, + CORE, + INTERNAL_NAMES, + PROPERTY_TYPE, + COLLECTION_TYPE, + LINK_TYPE, + METHOD_TYPE, + EVENT_TYPE, + INTERNAL_TYPES, + DEFAULT_TYPES, + SCHEMA_DEFINITION, + MODEL_DEFINITION, + TYPE_DEFINITION, +} diff --git a/src/runtime.js b/src/runtime.js index b95766c..a77a6bc 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -29,42 +29,36 @@ * It inits System Runtime metamodel and loads System Runtime core system. */ -'use strict'; - -var $db = require('./db.js'); -var $component = require('./component.js'); -var $metamodel = require('./metamodel.js'); -var $system = require('../build/system/system.js'); -var $helper = require('./helper.js'); +import $db from './db.js' +import $component from './component.js' +import $metamodel from './metamodel.js' +import $system from './system.js' /* Private Property */ -var sytemId = ''; -var system = ''; -var channel = null; - -// polyfill -$helper.polyfill(); +let sytemId = '' +let system = '' +let channel = null // init Metamodel -$metamodel.init(); +$metamodel.init() // init runtime from a system -sytemId = $db.importSystem($system.system); +sytemId = $db.importSystem($system.system) -system = $component.get(sytemId); -channel = $component.get('channel'); +system = $component.get(sytemId) +channel = $component.get('channel') -system.state('installed'); -channel.$systemInstalled(sytemId); -system.state('resolved'); -channel.$systemResolved(sytemId); -system.state('starting'); -channel.$systemStarted(sytemId); +system.state('installed') +channel.$systemInstalled(sytemId) +system.state('resolved') +channel.$systemResolved(sytemId) +system.state('starting') +channel.$systemStarted(sytemId) -system.start(); +system.start() -system.state('active'); +system.state('active') /* Public property */ @@ -73,4 +67,6 @@ system.state('active'); * @type _Runtime * @description _Runtime instance */ -module.exports = $component.get('runtime'); +const runtime = $component.get('runtime') + +export default runtime diff --git a/src/state.js b/src/state.js index 13c60a0..72d8b9a 100644 --- a/src/state.js +++ b/src/state.js @@ -20,15 +20,12 @@ /** * @module state - * @requires db * @description This module manages the states of all the components */ -'use strict'; - /* Private property */ -var store = {}; +let store = {} /* Public methods */ @@ -39,12 +36,12 @@ var store = {}; * @param {Object} value value of the state * @description Set the state of a component */ -exports.set = function set(id, state, value) { +function set(id, state, value) { store[id] = { state: state, value: value, - }; -}; + } +} /** * @method get @@ -52,14 +49,20 @@ exports.set = function set(id, state, value) { * @returns {String} state of the component * @description Get the state of a component */ -exports.get = function get(id) { - return store[id]; -}; +function get(id) { + return store[id] +} /** * @method clear * @description Remove all the states of the components from the memory */ -exports.clear = function clear() { - store = {}; -}; +function clear() { + store = {} +} + +export default { + set, + get, + clear, +} diff --git a/src/system.js b/src/system.js new file mode 100644 index 0000000..f353523 --- /dev/null +++ b/src/system.js @@ -0,0 +1,1382 @@ +/* + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* !! This file has been generated, do not edit it !! */ + +/** + * @module system + * @description This module contains System Runtime core system. + */ + +/* Public properties */ + +/** + * System Runtime core system + * @property {Object} system + */ +export default { + system: { + name: 'system-runtime', + master: false, + version: '5.1.0', + description: 'System Runtime', + schemas: { + '1ac07185641fa9f': { + _name: '_Behavior', + _inherit: ['_Component'], + _core: true, + core: 'property', + component: 'property', + action: 'property', + state: 'property', + useCoreAPI: 'property', + context: 'property', + _id: '1ac07185641fa9f', + }, + '104ad1f48518376': { + _id: '104ad1f48518376', + _name: '_Channel', + _inherit: ['_Component'], + _core: true, + send: 'event', + $systemInstalled: 'event', + $systemResolved: 'event', + $systemStarted: 'event', + $systemStopped: 'event', + $systemUninstalled: 'event', + }, + '111df11e2b19fde': { + _id: '111df11e2b19fde', + _name: '_Component', + _inherit: [], + _core: true, + on: 'method', + off: 'method', + require: 'method', + destroy: 'method', + init: 'method', + error: 'event', + }, + '1723516a30132ac': { + _name: '_Database', + _inherit: ['_Component'], + _core: true, + collections: 'method', + insert: 'event', + update: 'event', + remove: 'event', + _id: '1723516a30132ac', + }, + '1268f1dddd1fea7': { + _name: '_Logger', + _core: true, + level: 'property', + debug: 'method', + info: 'method', + warn: 'method', + error: 'method', + _id: '1268f1dddd1fea7', + }, + '14caa1c46414ee1': { + _name: '_Message', + _inherit: ['_Component'], + _core: true, + event: 'property', + from: 'property', + data: 'property', + _id: '14caa1c46414ee1', + }, + '193f1166eb16609': { + _name: '_Metamodel', + _inherit: ['_Component'], + _core: true, + schema: 'method', + model: 'method', + type: 'method', + create: 'method', + _id: '193f1166eb16609', + }, + '157931f7a31b61d': { + _id: '157931f7a31b61d', + _name: '_OSGi', + _inherit: ['_Component'], + _core: true, + install: 'method', + uninstall: 'method', + start: 'method', + stop: 'method', + status: 'method', + bundle: 'method', + }, + '12e211d4cd120a6': { + _id: '12e211d4cd120a6', + _name: '_Runtime', + _inherit: ['_OSGi'], + _core: true, + version: 'property', + system: 'method', + message: 'method', + ready: 'event', + }, + '1cb761fa4510dca': { + _id: '1cb761fa4510dca', + _name: '_System', + _inherit: ['_SystemOSGi'], + _core: true, + name: 'property', + master: 'property', + version: 'property', + description: 'property', + schemas: 'property', + models: 'property', + behaviors: 'property', + types: 'property', + components: 'property', + }, + '145fe10c7514298': { + _id: '145fe10c7514298', + _name: '_SystemOSGi', + _inherit: ['_Component'], + _core: true, + state: 'property', + location: 'property', + start: 'method', + stop: 'method', + }, + 'e018483e-4254-455c-83e9-99bb8dc3b233': { + _id: 'e018483e-4254-455c-83e9-99bb8dc3b233', + _name: '_History', + _core: true, + _inherit: ['_Component'], + back: 'method', + forward: 'method', + from: 'method', + dump: 'method', + get: 'method', + load: 'method', + start: 'method', + stop: 'method', + clear: 'method', + }, + }, + models: { + '166971fd9d107fd': { + _name: '_Behavior', + _core: true, + context: { + type: 'any', + readOnly: false, + mandatory: false, + default: null, + }, + core: { + type: 'boolean', + readOnly: false, + mandatory: false, + default: false, + }, + useCoreAPI: { + type: 'any', + readOnly: false, + mandatory: false, + default: false, + }, + component: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + action: { + type: 'javascript', + readOnly: false, + mandatory: true, + default: '', + }, + state: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + _id: '166971fd9d107fd', + }, + '135c71078810af2': { + _id: '135c71078810af2', + _name: '_Channel', + _core: true, + send: { + params: [ + { + name: 'message', + type: 'message', + }, + ], + }, + $systemInstalled: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + $systemResolved: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + $systemUninstalled: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + $systemStarted: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + $systemStopped: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + }, + '123751cb591de26': { + _id: '123751cb591de26', + _name: '_Component', + _core: true, + on: { + params: [ + { + name: 'state', + type: 'string', + }, + { + name: 'action', + type: 'function', + }, + { + name: 'useCoreAPI', + type: 'any', + mandatory: false, + default: false, + }, + { + name: 'isCore', + type: 'boolean', + mandatory: false, + default: false, + }, + ], + }, + off: { + params: [ + { + name: 'state', + type: 'string', + mandatory: false, + }, + { + name: 'behaviorId', + type: 'string', + mandatory: false, + }, + ], + }, + require: { + params: [ + { + name: 'id', + type: 'string', + }, + ], + }, + destroy: { + params: [], + }, + init: { + params: [ + { + name: 'document', + type: 'object', + }, + ], + }, + error: { + params: [ + { + name: 'e', + type: 'errorInfo', + }, + ], + }, + }, + '18a51169d7112d4': { + _name: '_Database', + _core: true, + collections: { + result: 'object', + }, + insert: { + params: [ + { + name: 'event', + type: 'dbInsertEvent', + }, + ], + }, + update: { + params: [ + { + name: 'event', + type: 'dbUpdateEvent', + }, + ], + }, + remove: { + params: [ + { + name: 'event', + type: 'dbRemoveEvent', + }, + ], + }, + _id: '18a51169d7112d4', + }, + '16b9d1ac2216ffe': { + _id: '16b9d1ac2216ffe', + _name: '_Logger', + _core: true, + level: { + type: 'log', + readOnly: false, + mandatory: false, + default: 'warn', + }, + debug: { + params: [ + { + name: 'message', + type: 'any', + }, + ], + }, + info: { + params: [ + { + name: 'message', + type: 'any', + }, + ], + }, + warn: { + params: [ + { + name: 'message', + type: 'any', + }, + ], + }, + error: { + params: [ + { + name: 'message', + type: 'any', + }, + ], + }, + }, + '1d9b6139411aa91': { + _name: '_Message', + _core: true, + event: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + from: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + data: { + type: 'array', + readOnly: false, + mandatory: true, + default: [], + }, + _id: '1d9b6139411aa91', + }, + '1628c13c22152e6': { + _name: '_Metamodel', + _core: true, + schema: { + params: [ + { + name: 'name', + type: 'any', + default: '', + mandatory: false, + }, + { + name: 'schema', + type: 'object', + default: {}, + mandatory: false, + }, + ], + result: 'any', + }, + model: { + params: [ + { + name: 'name', + type: 'any', + default: '', + mandatory: false, + }, + { + name: 'model', + type: 'object', + default: {}, + mandatory: false, + }, + ], + result: 'any', + }, + type: { + params: [ + { + name: 'name', + type: 'any', + default: '', + mandatory: false, + }, + { + name: 'type', + type: 'object', + default: {}, + mandatory: false, + }, + ], + result: 'any', + }, + create: { + params: [], + }, + _id: '1628c13c22152e6', + }, + '100b91ed2211b15': { + _id: '100b91ed2211b15', + _name: '_OSGi', + install: { + params: [ + { + name: 'url', + type: 'any', + mandatory: true, + default: '', + }, + { + name: 'async', + type: 'boolean', + mandatory: false, + default: true, + }, + ], + result: 'string', + }, + uninstall: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + start: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + stop: { + params: [ + { + name: 'id', + type: 'string', + mandatory: true, + default: '', + }, + ], + }, + status: { + result: 'object', + }, + _core: true, + bundle: { + result: 'string', + }, + }, + '14c7c105b31a160': { + _id: '14c7c105b31a160', + _name: '_Runtime', + _core: true, + version: { + type: 'string', + readOnly: true, + mandatory: true, + default: '5.1.0', + }, + system: { + params: [ + { + name: 'params', + type: 'any', + mandatory: false, + }, + ], + result: 'object', + }, + message: { + params: [ + { + name: 'msg', + type: 'message', + mandatory: true, + }, + ], + }, + ready: {}, + }, + '170521b88614387': { + _name: '_System', + _core: true, + name: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + master: { + type: 'boolean', + readOnly: false, + mandatory: false, + default: false, + }, + version: { + type: 'string', + readOnly: false, + mandatory: false, + default: '0.0.1', + }, + description: { + type: 'string', + readOnly: false, + mandatory: false, + default: '', + }, + schemas: { + type: 'object', + readOnly: false, + mandatory: false, + default: {}, + }, + models: { + type: 'object', + readOnly: false, + mandatory: false, + default: {}, + }, + behaviors: { + type: 'object', + readOnly: false, + mandatory: false, + default: {}, + }, + types: { + type: 'object', + readOnly: false, + mandatory: false, + default: {}, + }, + components: { + type: 'object', + readOnly: false, + mandatory: false, + default: {}, + }, + _id: '170521b88614387', + }, + '1b2811b092143f5': { + _id: '1b2811b092143f5', + _name: '_SystemOSGi', + start: {}, + stop: {}, + _core: true, + state: { + type: 'string', + readOnly: false, + mandatory: false, + default: 'none', + }, + location: { + type: 'string', + readOnly: false, + mandatory: false, + default: '', + }, + }, + 'bd8d7e02-cd1f-4e4e-857f-077d6425cc1a': { + _id: 'bd8d7e02-cd1f-4e4e-857f-077d6425cc1a', + _name: '_History', + _description: '', + back: { + result: 'number', + }, + forward: { + result: 'number', + }, + dump: { + result: 'string', + }, + _core: true, + from: { + params: [ + { + name: 'index', + type: 'number', + mandatory: true, + default: -1, + }, + ], + result: 'any', + }, + get: { + params: [ + { + name: 'index', + type: 'number', + mandatory: true, + default: -1, + }, + ], + result: 'object', + }, + load: { + params: [ + { + name: 'dump', + type: 'any', + mandatory: true, + default: '', + }, + ], + result: 'boolean', + }, + start: { + result: 'any', + }, + stop: { + result: 'any', + }, + clear: { + result: 'any', + }, + }, + }, + behaviors: { + '12e491859c13918': { + _id: '12e491859c13918', + component: '_Channel', + state: '$systemStarted', + action: + "function $systemStarted(id) { \n let systems = null;\n \n if (id !== 'e89c617b6b15d24') {\n if (typeof document !== 'undefined') {\n systems = document.querySelectorAll('link[rel=system]');\n \n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \n } else {\n if (systems.length + 1 === $db.collections._System.count()) {\n $component.get('runtime').ready();\n }\n }\n }\n }\n}", + useCoreAPI: true, + core: true, + }, + '1e9021bd4e1bc6e': { + _id: '1e9021bd4e1bc6e', + component: '_Channel', + state: '$systemInstalled', + action: + "function $systemInstalled(id) {\n let systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n // if all systems are installed\n systems = $db.collections._System.find({});\n\n systems.forEach(function (system) {\n let sys = this.require(system._id);\n if (sys && sys.state && sys.state() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db.collections._System.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n let system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n\n master = $db.collections._System.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n let system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system && system.state && system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n }\n }\n}", + useCoreAPI: true, + core: true, + }, + '1ba721201114b6b': { + _id: '1ba721201114b6b', + component: '_Component', + state: 'destroy', + action: 'function destroy() {\n $component.destroy(this.id());\n}', + core: true, + useCoreAPI: true, + }, + '15486186f41a48c': { + _id: '15486186f41a48c', + component: '_Component', + state: 'off', + action: + 'function off(state, behaviorId) {\n let args = [],\n i = 0,\n numInjectedParams = 9,\n length = arguments.length;\n\n if ($helper.isOnNode()) {\n numInjectedParams = numInjectedParams +1;\n }\n\n for (i = 0; i < length - numInjectedParams; i++) {\n args.push(arguments[i]);\n }\n\n if ($workflow.checkInput({\n "component": this,\n "methodName": "off",\n "args": args\n })) {\n\n if (state || behaviorId) {\n if ($metamodel.isValidState(state, this.constructor.name)) {\n $behavior.remove({\n "behaviorId": behaviorId,\n "componentId": this.id(),\n "state": state\n });\n } else {\n this.require(\'logger\').warn("invoke \\\'off\\\' method of component \'" + this.id() + "\' with an invalid state \'" + state + "\'");\n }\n } else {\n $behavior.remove({\n "componentId": this.id()\n });\n }\n }\n}', + core: true, + useCoreAPI: true, + }, + '1da0a17878104c3': { + _id: '1da0a17878104c3', + component: '_Component', + state: 'require', + action: 'function require(id) {\n return $component.get(id);\n}', + core: true, + useCoreAPI: true, + }, + '1a5111d17a1800c': { + _id: '1a5111d17a1800c', + component: '_Database', + state: 'collections', + action: + "function collections() {\n let result = {},\n collectionName = '';\n\n for (collectionName in $db.store) {\n if ($db.store.hasOwnProperty(collectionName)) {\n result[collectionName] = $db.collections[collectionName];\n }\n }\n return result;\n}", + core: true, + useCoreAPI: true, + }, + '1d993108fa18ef2': { + _id: '1d993108fa18ef2', + component: '_Logger', + state: 'debug', + action: + "function debug(message) {\n if (this.level() === 'debug') {\n console.log('runtime: ' + message);\n }\n}", + core: true, + }, + '1a37a188e11fe73': { + _id: '1a37a188e11fe73', + component: '_Logger', + state: 'error', + action: + "function error(message) {\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\n console.error('runtime: ' + message);\n }\n}", + core: true, + }, + '1edd21e12a16534': { + _id: '1edd21e12a16534', + component: '_Logger', + state: 'info', + action: + "function info(message) {\n if (this.level() === 'info' || this.level() === 'debug') {\n console.info('runtime: ' + message);\n }\n}", + core: true, + }, + '141f2143d3122a4': { + _id: '141f2143d3122a4', + component: '_Logger', + state: 'level', + action: 'function level(val) {\n $log.level(val);\n}', + core: true, + useCoreAPI: true, + }, + '192401bab21304e': { + _id: '192401bab21304e', + component: '_Logger', + state: 'warn', + action: + "function warn(message) {\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\n console.warn('runtime: ' + message);\n }\n}", + core: true, + }, + '11fc715e2f1a31e': { + _id: '11fc715e2f1a31e', + component: '_Metamodel', + state: 'create', + action: 'function create() {\n $metamodel.create();\n}', + core: true, + useCoreAPI: true, + }, + '1232f1f107142cf': { + _id: '1232f1f107142cf', + component: '_Metamodel', + state: 'model', + action: + 'function model(name, model) {\n return $metamodel.model(name, model);\n}', + core: true, + useCoreAPI: true, + }, + '1365412f69153d2': { + _id: '1365412f69153d2', + component: '_Metamodel', + state: 'schema', + action: + 'function schema(name, schema) {\n return $metamodel.schema(name, schema);\n}', + core: true, + useCoreAPI: true, + }, + '194db147fe161a2': { + _id: '194db147fe161a2', + component: '_Metamodel', + state: 'type', + action: + 'function type(name, type) {\n return $metamodel.type(name, type);\n}', + core: true, + useCoreAPI: true, + }, + '1ef951f1411b895': { + _id: '1ef951f1411b895', + component: '_OSGi', + state: 'install', + action: + "function install(url, async) {\n let importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\n if (url.indexOf('.json') !== -1) {\n if (typeof global.process.env.PWD === 'undefined') {\n system = require(global.process.cwd() + '/' + url);\n } else {\n system = require(global.process.env.PWD + '/' + url);\n }\n } else {\n system = require(url);\n }\n systemId = $db.importSystem(system);\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n let sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n }\n return result;\n}", + useCoreAPI: true, + core: true, + }, + '14c1517b711cb78': { + _id: '14c1517b711cb78', + component: '_OSGi', + state: 'uninstall', + action: + "function uninstall(id) {\n let search = {},\n system = null,\n behaviorId = '',\n collection = '',\n componentId = '',\n length = 0,\n i = 0,\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\n\n search = $db.collections._System.find({\n '_id': id\n });\n\n if (search.length) {\n system = search[0];\n // remove behaviors\n if (system.behaviors) {\n for (behaviorId in system.behaviors) {\n $db.collections._Behavior.remove({\n '_id': system.behaviors[behaviorId]._id\n });\n }\n }\n // remove components\n if (system.components) {\n for (collection in system.components) {\n for (componentId in system.components[collection]) {\n if (coreComponents.indexOf(componentId) === -1) {\n $db.collections[collection].remove({\n '_id': componentId\n });\n }\n }\n }\n }\n }\n if (this.require(id) && this.require(id).state) {\n this.require(id).state('uninstalled');\n this.require('channel').$systemUninstalled(id);\n }\n}", + useCoreAPI: true, + core: true, + }, + '105f219c6813643': { + _id: '105f219c6813643', + component: '_OSGi', + state: 'start', + action: + "function start(id) {\n let system = this.require(id),\n channel = this.require('channel');\n\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\n system.state('starting');\n if (system.start) {\n system.start();\n }\n channel.$systemStarted(id);\n system.state('active');\n }\n}", + useCoreAPI: false, + core: true, + }, + '1a81a1f00d17269': { + _id: '1a81a1f00d17269', + component: '_OSGi', + state: 'stop', + action: + "function stop(id) {\n let system = this.require(id),\n channel = this.require('channel');\n\n if (system && system.state() === 'active') {\n system.state('stopping');\n if (system.stop) {\n system.stop();\n }\n channel.$systemStopped(id);\n system.state('resolved');\n channel.$systemResolved(id);\n }\n}", + useCoreAPI: false, + core: true, + }, + '116851b602128d1': { + _id: '116851b602128d1', + component: '_OSGi', + state: 'status', + action: + "function status() {\n let result = {},\n system = null,\n length = 0,\n i = 0;\n\n systems = $db.collections._System.find({});\n\n length = systems.length;\n for (i = 0; i < length; i++) {\n system = systems[i];\n result[system.name] = {\n 'id': system._id,\n 'state': system.state,\n 'name': system.name,\n 'version': system.version,\n 'location': system.location,\n 'master': system.master\n };\n }\n\n return result;\n}", + useCoreAPI: true, + core: true, + }, + '19cf317d7217331': { + _id: '19cf317d7217331', + component: '_OSGi', + state: 'bundle', + action: + 'function bundle() { \n\tlet result = $db.exportSystem();\n\treturn result;\n}', + useCoreAPI: true, + core: true, + }, + '13010167f313f87': { + _id: '13010167f313f87', + component: '_Runtime', + state: 'system', + action: + "function system(params) {\n let RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n\n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('_System');\n system = new RuntimeSystem(conf);\n system.state('active');\n } else {\n result = $db.collections._System.find({\n 'master': true\n });\n if (result.length) {\n systemId = result[0]._id;\n system = $component.get(systemId);\n }\n }\n return system;\n}", + core: true, + useCoreAPI: true, + }, + '1cfa4145f614da8': { + _id: '1cfa4145f614da8', + component: '_Runtime', + state: 'message', + action: + 'function message(msg) { \n $db.collections._Message.insert(msg);\n}', + useCoreAPI: true, + core: true, + }, + '1cb9d103d41dd97': { + _id: '1cb9d103d41dd97', + component: 'e89c617b6b15d24', + state: 'start', + action: + "function start() {\n if (typeof document !== 'undefined') {\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\n let systems = [],\n system = null,\n scripts = [],\n script = null,\n logLevel = 'warn',\n i = 0,\n length = 0;\n \n systems = document.querySelectorAll('link[rel=system]');\n length = systems.length;\n \n // logger\n scripts = document.querySelectorAll('script[log]');\n if (scripts.length) {\n logLevel = scripts[0].getAttribute('log');\n this.require('logger').level(logLevel);\n }\n \n // systems\n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('runtime').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n \n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }.bind(this));\n }\n}", + useCoreAPI: true, + core: true, + }, + 'e2848b60-99a1-472f-b0e1-5923077f6c61': { + _id: 'e2848b60-99a1-472f-b0e1-5923077f6c61', + component: '_History', + state: 'back', + action: 'function back() { \n return $history.back();\n}', + useCoreAPI: true, + core: true, + }, + 'cebc40ad-c704-405c-b499-e60390b1bb82': { + _id: 'cebc40ad-c704-405c-b499-e60390b1bb82', + component: '_History', + state: 'forward', + action: 'function forward() { \n return $history.forward();\n}', + useCoreAPI: true, + core: true, + }, + 'c35af0df-2fc6-4af5-a476-4f2ee089c30e': { + _id: 'c35af0df-2fc6-4af5-a476-4f2ee089c30e', + component: '_History', + state: 'dump', + action: 'function dump() { \n return $history.dump();\n}', + useCoreAPI: true, + core: true, + }, + 'f06254ad-187e-400c-a582-b5ab81f24747': { + _id: 'f06254ad-187e-400c-a582-b5ab81f24747', + component: '_History', + state: 'get', + action: 'function get(index) { \n return $history.get(index);\n}', + useCoreAPI: true, + core: true, + }, + 'aa731445-8d7c-4dd7-a78f-5dd70f750f87': { + _id: 'aa731445-8d7c-4dd7-a78f-5dd70f750f87', + component: '_History', + state: 'from', + action: 'function from(index) { \n return $history.from(index);\n}', + useCoreAPI: true, + core: true, + }, + 'f565e46e-daee-492d-99ca-d9ed123132ba': { + _id: 'f565e46e-daee-492d-99ca-d9ed123132ba', + component: '_History', + state: 'load', + action: 'function load(dump) { \n return $history.load(dump);\n}', + useCoreAPI: true, + core: true, + }, + 'd3827b91-f6db-46d9-833e-351564cb6e91': { + _id: 'd3827b91-f6db-46d9-833e-351564cb6e91', + component: '_History', + state: 'start', + action: 'function start() { \n return $history.start();\n}', + useCoreAPI: true, + core: true, + }, + 'aa3b13ab-8b69-4962-bc44-e975cd42a206': { + _id: 'aa3b13ab-8b69-4962-bc44-e975cd42a206', + component: '_History', + state: 'stop', + action: 'function stop() { \n return $history.stop();\n}', + useCoreAPI: true, + core: true, + }, + 'b112782c-3633-443e-8d7a-8d379b44e32d': { + _id: 'b112782c-3633-443e-8d7a-8d379b44e32d', + component: '_History', + state: 'clear', + action: 'function clear() { \n return $history.clear();\n}', + useCoreAPI: true, + core: true, + }, + }, + types: { + css: { + _id: 'h1d88311ac019211', + name: 'css', + type: 'string', + core: true, + }, + date: { + _id: 'c17cad1bc3d17752', + name: 'date', + type: 'object', + core: true, + }, + json: { + _id: 'e1d25a12e67127ed', + name: 'json', + type: 'object', + core: true, + }, + dbInsertEvent: { + _id: '148ef1e19810e6d', + core: true, + name: 'dbInsertEvent', + type: 'object', + schema: { + collection: { + type: 'string', + mandatory: true, + default: '', + }, + document: { + type: 'object', + mandatory: true, + default: {}, + }, + }, + }, + dbRemoveEvent: { + _id: '1952e1ac4213f4a', + name: 'dbRemoveEvent', + type: 'object', + core: true, + schema: { + collection: { + type: 'string', + mandatory: true, + default: '', + }, + id: { + type: 'string', + mandatory: true, + default: '', + }, + }, + }, + dbUpdateEvent: { + _id: '1f5c41309711752', + core: true, + name: 'dbUpdateEvent', + type: 'object', + schema: { + collection: { + type: 'string', + mandatory: true, + default: '', + }, + id: { + type: 'string', + mandatory: true, + default: '', + }, + field: { + type: 'string', + mandatory: true, + default: '', + }, + value: { + type: 'any', + mandatory: true, + default: null, + }, + }, + }, + collection: { + _id: 'd1c0d0130c616199', + name: 'collection', + type: 'object', + schema: { + type: { + type: ['string'], + mandatory: true, + }, + readOnly: { + type: 'boolean', + mandatory: true, + }, + mandatory: { + type: 'boolean', + mandatory: true, + }, + default: { + type: 'array', + mandatory: true, + }, + description: { + type: 'string', + mandatory: false, + }, + label: { + type: 'string', + mandatory: false, + }, + kind: { + type: 'string', + mandatory: false, + }, + }, + core: true, + }, + event: { + _id: 'g1668d1de2d1ff6f', + name: 'event', + type: 'object', + schema: { + params: { + type: ['parameter'], + mandatory: false, + }, + description: { + type: 'string', + mandatory: false, + }, + }, + core: true, + }, + html: { + _id: 'y161c21320b11acb', + name: 'html', + type: 'string', + core: true, + }, + javascript: { + _id: 's13d4c1fdf916504', + name: 'javascript', + type: 'string', + core: true, + }, + link: { + _id: 'p124601801d1dbfa', + name: 'link', + type: 'object', + schema: { + type: { + type: 'string', + mandatory: true, + }, + readOnly: { + type: 'boolean', + mandatory: true, + }, + mandatory: { + type: 'boolean', + mandatory: true, + }, + default: { + type: '{type}', + mandatory: true, + }, + description: { + type: 'string', + mandatory: false, + }, + label: { + type: 'string', + mandatory: false, + }, + kind: { + type: 'string', + mandatory: false, + }, + }, + core: true, + }, + log: { + _id: 'd1fd161a4a4149fc', + name: 'log', + type: 'string', + value: ['debug', 'info', 'warn', 'error', 'off'], + core: true, + }, + message: { + _id: 'l13b061ac571272d', + name: 'message', + type: 'object', + schema: { + event: { + type: 'string', + mandatory: true, + }, + from: { + type: 'string', + mandatory: false, + }, + data: { + type: 'array', + mandatory: true, + }, + }, + core: true, + }, + method: { + _id: 'x1227218eed1f3e9', + name: 'method', + type: 'object', + schema: { + result: { + type: 'any', + mandatory: false, + }, + params: { + type: ['parameter'], + mandatory: false, + }, + description: { + type: 'string', + mandatory: false, + }, + }, + core: true, + }, + osgiStates: { + _id: 'q1f0ca120fc13fb3', + name: 'osgiStates', + type: 'string', + value: [ + 'none', + 'installed', + 'resolved', + 'starting', + 'active', + 'stopping', + 'uninstalled', + ], + core: true, + }, + parameter: { + _id: 'e1b18e16c6c195ad', + name: 'parameter', + type: 'object', + schema: { + description: { + type: 'string', + mandatory: false, + }, + name: { + type: 'string', + mandatory: true, + }, + type: { + type: 'any', + mandatory: true, + }, + mandatory: { + type: 'boolean', + mandatory: false, + }, + default: { + type: '{type}', + mandatory: false, + }, + }, + core: true, + }, + property: { + _id: 'a16a3a1ae051a55d', + name: 'property', + type: 'object', + schema: { + type: { + type: 'string', + mandatory: true, + }, + readOnly: { + type: 'boolean', + mandatory: true, + }, + mandatory: { + type: 'boolean', + mandatory: true, + }, + default: { + type: '{type}', + mandatory: true, + }, + description: { + type: 'string', + mandatory: false, + }, + label: { + type: 'string', + mandatory: false, + }, + }, + core: true, + }, + text: { + _id: 'c136fc129a912f54', + name: 'text', + type: 'string', + core: true, + }, + errorInfo: { + _id: 'e198761fc0b1ae8a', + name: 'errorInfo', + type: 'object', + schema: { + message: { + type: 'string', + mandatory: true, + }, + stack: { + type: 'object', + mandatory: true, + }, + }, + core: true, + }, + }, + components: { + _Channel: { + channel: { + _id: 'channel', + }, + }, + _Database: { + db: { + _id: 'db', + }, + }, + _Logger: { + logger: { + _id: 'logger', + level: 'warn', + }, + }, + _Metamodel: { + metamodel: { + _id: 'metamodel', + }, + }, + _Runtime: { + runtime: { + _id: 'runtime', + version: '5.1.0', + }, + }, + _History: { + history: { + _id: 'history', + }, + }, + }, + _id: 'e89c617b6b15d24', + }, +} diff --git a/src/system/README.md b/src/system/README.md index f4f1937..76208e7 100644 --- a/src/system/README.md +++ b/src/system/README.md @@ -2,9 +2,9 @@ System Runtime has got a customizable system. You can update all its models, components and behaviors to follow your needs. To do so: -* open a version of [System Designer](https://designfirst.io/systemdesigner/), -* import the core system, -* edit the core system, -* export it, -* save it in the same place and -* run `npm run build`. \ No newline at end of file +- open a version of [System Designer](https://designfirst.io/systemdesigner/), +- import the core system, +- edit the core system, +- export it, +- save it in the same place and +- run `npm run build`. diff --git a/src/system/system-runtime.json b/src/system/system-runtime.json index bf76233..aeeb0d6 100644 --- a/src/system/system-runtime.json +++ b/src/system/system-runtime.json @@ -514,7 +514,7 @@ "_id": "12e491859c13918", "component": "_Channel", "state": "$systemStarted", - "action": "function $systemStarted(id) { \n var systems = null;\n \n if (id !== 'e89c617b6b15d24') {\n if (typeof document !== 'undefined') {\n systems = document.querySelectorAll('link[rel=system]');\n \n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \n } else {\n if (systems.length + 1 === $db._System.count()) {\n $component.get('runtime').ready();\n }\n }\n }\n }\n}", + "action": "function $systemStarted(id) { \n let systems = null;\n \n if (id !== 'e89c617b6b15d24') {\n if (typeof document !== 'undefined') {\n systems = document.querySelectorAll('link[rel=system]');\n \n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \n } else {\n if (systems.length + 1 === $db.collections._System.count()) {\n $component.get('runtime').ready();\n }\n }\n }\n }\n}", "useCoreAPI": true, "core": true }, @@ -522,7 +522,7 @@ "_id": "1e9021bd4e1bc6e", "component": "_Channel", "state": "$systemInstalled", - "action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n // if all systems are installed\n systems = $db._System.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys && sys.state && sys.state() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db._System.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n\n master = $db._System.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system && system.state && system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n }\n }\n}", + "action": "function $systemInstalled(id) {\n let systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n // if all systems are installed\n systems = $db.collections._System.find({});\n\n systems.forEach(function (system) {\n let sys = this.require(system._id);\n if (sys && sys.state && sys.state() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db.collections._System.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n let system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n\n master = $db.collections._System.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n let system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system && system.state && system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n }\n }\n}", "useCoreAPI": true, "core": true }, @@ -538,7 +538,7 @@ "_id": "15486186f41a48c", "component": "_Component", "state": "off", - "action": "function off(state, behaviorId) {\n var args = [],\n i = 0,\n numInjectedParams = 9,\n length = arguments.length;\n\n if ($helper.isOnNode()) {\n numInjectedParams = numInjectedParams +1;\n }\n\n for (i = 0; i < length - numInjectedParams; i++) {\n args.push(arguments[i]);\n }\n\n if ($workflow.checkInput({\n \"component\": this,\n \"methodName\": \"off\",\n \"args\": args\n })) {\n\n if (state || behaviorId) {\n if ($metamodel.isValidState(state, this.constructor.name)) {\n $behavior.remove({\n \"behaviorId\": behaviorId,\n \"componentId\": this.id(),\n \"state\": state\n });\n } else {\n this.require('logger').warn(\"invoke \\'off\\' method of component '\" + this.id() + \"' with an invalid state '\" + state + \"'\");\n }\n } else {\n $behavior.remove({\n \"componentId\": this.id()\n });\n }\n }\n}", + "action": "function off(state, behaviorId) {\n let args = [],\n i = 0,\n numInjectedParams = 9,\n length = arguments.length;\n\n if ($helper.isOnNode()) {\n numInjectedParams = numInjectedParams +1;\n }\n\n for (i = 0; i < length - numInjectedParams; i++) {\n args.push(arguments[i]);\n }\n\n if ($workflow.checkInput({\n \"component\": this,\n \"methodName\": \"off\",\n \"args\": args\n })) {\n\n if (state || behaviorId) {\n if ($metamodel.isValidState(state, this.constructor.name)) {\n $behavior.remove({\n \"behaviorId\": behaviorId,\n \"componentId\": this.id(),\n \"state\": state\n });\n } else {\n this.require('logger').warn(\"invoke \\'off\\' method of component '\" + this.id() + \"' with an invalid state '\" + state + \"'\");\n }\n } else {\n $behavior.remove({\n \"componentId\": this.id()\n });\n }\n }\n}", "core": true, "useCoreAPI": true }, @@ -554,7 +554,7 @@ "_id": "1a5111d17a1800c", "component": "_Database", "state": "collections", - "action": "function collections() {\n var result = {},\n collectionName = '';\n\n for (collectionName in $db.store) {\n if ($db.store.hasOwnProperty(collectionName)) {\n result[collectionName] = $db[collectionName];\n }\n }\n return result;\n}", + "action": "function collections() {\n let result = {},\n collectionName = '';\n\n for (collectionName in $db.store) {\n if ($db.store.hasOwnProperty(collectionName)) {\n result[collectionName] = $db.collections[collectionName];\n }\n }\n return result;\n}", "core": true, "useCoreAPI": true }, @@ -630,7 +630,7 @@ "_id": "1ef951f1411b895", "component": "_OSGi", "state": "install", - "action": "function install(url, async) {\n var importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\n if (url.indexOf('.json') !== -1) {\n if (typeof global.process.env.PWD === 'undefined') {\n system = require(global.process.cwd() + '/' + url);\n } else {\n system = require(global.process.env.PWD + '/' + url);\n }\n } else {\n system = require(url);\n }\n systemId = $db.importSystem(system);\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n var sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n }\n return result;\n}", + "action": "function install(url, async) {\n let importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\n if (url.indexOf('.json') !== -1) {\n if (typeof global.process.env.PWD === 'undefined') {\n system = require(global.process.cwd() + '/' + url);\n } else {\n system = require(global.process.env.PWD + '/' + url);\n }\n } else {\n system = require(url);\n }\n systemId = $db.importSystem(system);\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n let sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n }\n return result;\n}", "useCoreAPI": true, "core": true }, @@ -638,7 +638,7 @@ "_id": "14c1517b711cb78", "component": "_OSGi", "state": "uninstall", - "action": "function uninstall(id) {\n var search = {},\n system = null,\n behaviorId = '',\n collection = '',\n componentId = '',\n length = 0,\n i = 0,\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\n\n search = $db._System.find({\n '_id': id\n });\n\n if (search.length) {\n system = search[0];\n // remove behaviors\n if (system.behaviors) {\n for (behaviorId in system.behaviors) {\n $db._Behavior.remove({\n '_id': system.behaviors[behaviorId]._id\n });\n }\n }\n // remove components\n if (system.components) {\n for (collection in system.components) {\n for (componentId in system.components[collection]) {\n if (coreComponents.indexOf(componentId) === -1) {\n $db[collection].remove({\n '_id': componentId\n });\n }\n }\n }\n }\n }\n if (this.require(id) && this.require(id).state) {\n this.require(id).state('uninstalled');\n this.require('channel').$systemUninstalled(id);\n }\n}", + "action": "function uninstall(id) {\n let search = {},\n system = null,\n behaviorId = '',\n collection = '',\n componentId = '',\n length = 0,\n i = 0,\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\n\n search = $db.collections._System.find({\n '_id': id\n });\n\n if (search.length) {\n system = search[0];\n // remove behaviors\n if (system.behaviors) {\n for (behaviorId in system.behaviors) {\n $db.collections._Behavior.remove({\n '_id': system.behaviors[behaviorId]._id\n });\n }\n }\n // remove components\n if (system.components) {\n for (collection in system.components) {\n for (componentId in system.components[collection]) {\n if (coreComponents.indexOf(componentId) === -1) {\n $db.collections[collection].remove({\n '_id': componentId\n });\n }\n }\n }\n }\n }\n if (this.require(id) && this.require(id).state) {\n this.require(id).state('uninstalled');\n this.require('channel').$systemUninstalled(id);\n }\n}", "useCoreAPI": true, "core": true }, @@ -646,7 +646,7 @@ "_id": "105f219c6813643", "component": "_OSGi", "state": "start", - "action": "function start(id) {\n var system = this.require(id),\n channel = this.require('channel');\n\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\n system.state('starting');\n if (system.start) {\n system.start();\n }\n channel.$systemStarted(id);\n system.state('active');\n }\n}", + "action": "function start(id) {\n let system = this.require(id),\n channel = this.require('channel');\n\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\n system.state('starting');\n if (system.start) {\n system.start();\n }\n channel.$systemStarted(id);\n system.state('active');\n }\n}", "useCoreAPI": false, "core": true }, @@ -654,7 +654,7 @@ "_id": "1a81a1f00d17269", "component": "_OSGi", "state": "stop", - "action": "function stop(id) {\n var system = this.require(id),\n channel = this.require('channel');\n\n if (system && system.state() === 'active') {\n system.state('stopping');\n if (system.stop) {\n system.stop();\n }\n channel.$systemStopped(id);\n system.state('resolved');\n channel.$systemResolved(id);\n }\n}", + "action": "function stop(id) {\n let system = this.require(id),\n channel = this.require('channel');\n\n if (system && system.state() === 'active') {\n system.state('stopping');\n if (system.stop) {\n system.stop();\n }\n channel.$systemStopped(id);\n system.state('resolved');\n channel.$systemResolved(id);\n }\n}", "useCoreAPI": false, "core": true }, @@ -662,7 +662,7 @@ "_id": "116851b602128d1", "component": "_OSGi", "state": "status", - "action": "function status() {\n var result = {},\n system = null,\n length = 0,\n i = 0;\n\n systems = $db._System.find({});\n\n length = systems.length;\n for (i = 0; i < length; i++) {\n system = systems[i];\n result[system.name] = {\n 'id': system._id,\n 'state': system.state,\n 'name': system.name,\n 'version': system.version,\n 'location': system.location,\n 'master': system.master\n };\n }\n\n return result;\n}", + "action": "function status() {\n let result = {},\n system = null,\n length = 0,\n i = 0;\n\n systems = $db.collections._System.find({});\n\n length = systems.length;\n for (i = 0; i < length; i++) {\n system = systems[i];\n result[system.name] = {\n 'id': system._id,\n 'state': system.state,\n 'name': system.name,\n 'version': system.version,\n 'location': system.location,\n 'master': system.master\n };\n }\n\n return result;\n}", "useCoreAPI": true, "core": true }, @@ -670,7 +670,7 @@ "_id": "19cf317d7217331", "component": "_OSGi", "state": "bundle", - "action": "function bundle() { \n\tvar result = $db.exportSystem();\n\treturn result;\n}", + "action": "function bundle() { \n\tlet result = $db.exportSystem();\n\treturn result;\n}", "useCoreAPI": true, "core": true }, @@ -678,7 +678,7 @@ "_id": "13010167f313f87", "component": "_Runtime", "state": "system", - "action": "function system(params) {\n var RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n\n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('_System');\n system = new RuntimeSystem(conf);\n system.state('active');\n } else {\n result = $db._System.find({\n 'master': true\n });\n if (result.length) {\n systemId = result[0]._id;\n system = $component.get(systemId);\n }\n }\n return system;\n}", + "action": "function system(params) {\n let RuntimeSystem = null,\n system = {},\n systemId = '',\n result = [],\n conf = {};\n\n if (params) {\n if (typeof params === 'string') {\n conf.master = true;\n conf.name = params;\n } else {\n conf = params;\n conf.master = true;\n }\n RuntimeSystem = this.require('_System');\n system = new RuntimeSystem(conf);\n system.state('active');\n } else {\n result = $db.collections._System.find({\n 'master': true\n });\n if (result.length) {\n systemId = result[0]._id;\n system = $component.get(systemId);\n }\n }\n return system;\n}", "core": true, "useCoreAPI": true }, @@ -686,7 +686,7 @@ "_id": "1cfa4145f614da8", "component": "_Runtime", "state": "message", - "action": "function message(msg) { \n $db._Message.insert(msg);\n}", + "action": "function message(msg) { \n $db.collections._Message.insert(msg);\n}", "useCoreAPI": true, "core": true }, @@ -694,7 +694,7 @@ "_id": "1cb9d103d41dd97", "component": "e89c617b6b15d24", "state": "start", - "action": "function start() {\n if (typeof document !== 'undefined') {\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\n var systems = [],\n system = null,\n scripts = [],\n script = null,\n logLevel = 'warn',\n i = 0,\n length = 0;\n \n systems = document.querySelectorAll('link[rel=system]');\n length = systems.length;\n \n // logger\n scripts = document.querySelectorAll('script[log]');\n if (scripts.length) {\n logLevel = scripts[0].getAttribute('log');\n this.require('logger').level(logLevel);\n }\n \n // systems\n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('runtime').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n \n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }.bind(this));\n }\n}", + "action": "function start() {\n if (typeof document !== 'undefined') {\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\n let systems = [],\n system = null,\n scripts = [],\n script = null,\n logLevel = 'warn',\n i = 0,\n length = 0;\n \n systems = document.querySelectorAll('link[rel=system]');\n length = systems.length;\n \n // logger\n scripts = document.querySelectorAll('script[log]');\n if (scripts.length) {\n logLevel = scripts[0].getAttribute('log');\n this.require('logger').level(logLevel);\n }\n \n // systems\n for (i = 0; i < length; i++) {\n system = systems[i];\n \n if (system.getAttribute('async') === 'false') {\n this.require('runtime').install(system.href, false);\n } else {\n this.require('runtime').install(system.href, true);\n }\n }\n \n // ready event\n if (length === 0) {\n this.require('runtime').ready();\n }\n }.bind(this));\n }\n}", "useCoreAPI": true, "core": true }, diff --git a/src/workflow.js b/src/workflow.js index 80c83d4..03fee21 100644 --- a/src/workflow.js +++ b/src/workflow.js @@ -38,16 +38,14 @@ * */ -'use strict'; - -var $metamodel = require('./metamodel.js'); -var $component = require('./component.js'); -var $behavior = require('./behavior.js'); -var $state = require('./state.js'); -var $helper = require('./helper.js'); -var $log = require('./log.js'); -var $db = require('./db.js'); -var $history = require('./history.js'); +import $metamodel from './metamodel.js' +import $component from './component.js' +import $behavior from './behavior.js' +import $state from './state.js' +import $helper from './helper.js' +import $log from './log.js' +import $db from './db.js' +import $history from './history.js' /* Private methods */ @@ -58,11 +56,11 @@ var $history = require('./history.js'); * @description The RuntimeError class */ function RuntimeError(message) { - this.message = message; - this.name = 'RuntimeError'; + this.message = message + this.name = 'RuntimeError' } -RuntimeError.prototype = new Error(); -RuntimeError.prototype.constructor = RuntimeError; +RuntimeError.prototype = new Error() +RuntimeError.prototype.constructor = RuntimeError /** * @method isModelPath @@ -72,7 +70,7 @@ RuntimeError.prototype.constructor = RuntimeError; * @description Is the value a model path */ function isModelPath(value) { - return value.indexOf('.') !== -1; + return value.indexOf('.') !== -1 } /** @@ -84,32 +82,32 @@ function isModelPath(value) { * @description Get all the names of the parameter of a method */ function getParamNames(id, methodName) { - var method = null; - var params = []; - var result = []; - var length = 0; - var i = 0; + let method = null + let params = [] + let result = [] + let length = 0 + let i = 0 if ($metamodel.getModel(id)) { - method = $metamodel.getModel(id)[methodName]; + method = $metamodel.getModel(id)[methodName] } else { - $log.unknownModel(id); + $log.unknownModel(id) } if (method) { - params = method.params; + params = method.params if (params) { - length = params.length; + length = params.length for (i = 0; i < length; i++) { - result.push(params[i].name); + result.push(params[i].name) } } } else { if (!isModelPath(methodName)) { - $log.unknownMethod(id, methodName); + $log.unknownMethod(id, methodName) } } - return result; + return result } /** @@ -121,42 +119,42 @@ function getParamNames(id, methodName) { * @description Get the number of parameters of a method */ function getParamNumber(id, methodName) { - var method = null; - var params = []; - var result = []; - var length = 0; - var i = 0; - var min = 0; - var max = 0; + let method = null + let params = [] + let result = [] + let length = 0 + let i = 0 + let min = 0 + let max = 0 if ($metamodel.getModel(id)) { - method = $metamodel.getModel(id)[methodName]; + method = $metamodel.getModel(id)[methodName] } else { - $log.unknownModel(id); + $log.unknownModel(id) } if (method) { - params = method.params; + params = method.params if (params) { - length = params.length; + length = params.length for (i = 0; i < length; i++) { if ( typeof params[i].mandatory === 'undefined' || params[i].mandatory === true ) { - min = min + 1; + min = min + 1 } - max = max + 1; + max = max + 1 } } - result.push(min); - result.push(max); + result.push(min) + result.push(max) } else { if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) { - $log.unknownMethod(id, methodName); + $log.unknownMethod(id, methodName) } } - return result; + return result } /** @@ -169,33 +167,33 @@ function getParamNumber(id, methodName) { * @description Set the default value of the non mandatory parameters of a method */ function setDefaultValue(id, methodName, args) { - var method = null; - var params = []; - var result = []; - var length = 0; - var i = 0; + let method = null + let params = [] + let result = [] + let length = 0 + let i = 0 - method = $metamodel.getModel(id)[methodName]; + method = $metamodel.getModel(id)[methodName] if (method) { - params = method.params; + params = method.params if (params) { - length = params.length; + length = params.length for (i = 0; i < length; i++) { if (params[i].mandatory === false && typeof args[i] === 'undefined') { - result.push(params[i].default); + result.push(params[i].default) } else { - result.push(args[i]); + result.push(args[i]) } } } } else { if (methodName.indexOf('[') === -1) { - $log.unknownMethod(id, methodName); + $log.unknownMethod(id, methodName) } else { - result = args; + result = args } } - return result; + return result } /** @@ -207,19 +205,19 @@ function setDefaultValue(id, methodName, args) { * @description Get the type returned by a method */ function getReturnType(id, methodName) { - var resultType = null; - var result = null; + let resultType = null + let result = null if ($metamodel.getModel(id)) { - resultType = $metamodel.getModel(id)[methodName].result; + resultType = $metamodel.getModel(id)[methodName].result } else { - $log.unknownModel(id); + $log.unknownModel(id) } if (resultType) { - result = resultType; + result = resultType } - return result; + return result } /** @@ -231,32 +229,32 @@ function getReturnType(id, methodName) { * @description Get all the type of the parameters of a method */ function getParamTypes(id, methodName) { - var method = null; - var params = []; - var result = []; - var length = 0; - var i = 0; + let method = null + let params = [] + let result = [] + let length = 0 + let i = 0 if ($metamodel.getModel(id)) { - method = $metamodel.getModel(id)[methodName]; + method = $metamodel.getModel(id)[methodName] } else { - $log.unknownModel(id); + $log.unknownModel(id) } if (method) { - params = method.params; + params = method.params if (params) { - length = params.length; + length = params.length for (i = 0; i < length; i++) { - result.push(params[i].type); + result.push(params[i].type) } } } else { if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) { - $log.unknownMethod(id, methodName); + $log.unknownMethod(id, methodName) } } - return result; + return result } /** @@ -269,39 +267,39 @@ function getParamTypes(id, methodName) { * @description Get the actions of the specified state */ function getActions(component, name, isEvent) { - var action = $behavior.getActions(component.id(), name); - var parents = []; - var length = 0; - var i = 0; - var parent = null; + let action = $behavior.getActions(component.id(), name) + let parents = [] + let length = 0 + let i = 0 + let parent = null if (!action.length || isEvent) { if (component.constructor.name !== 'Function') { action = action.concat( getActions($component.get(component.constructor.name), name, isEvent) - ); + ) } else { - parents = $metamodel.getParents(component.name); - length = parents.length; + parents = $metamodel.getParents(component.name) + length = parents.length for (i = 0; i < length; i++) { - parent = $component.get(parents[i]); + parent = $component.get(parents[i]) if (parent) { - action = action.concat(getActions(parent, name, isEvent)); + action = action.concat(getActions(parent, name, isEvent)) } else { - $log.unknownComponent(parents[i], component.name); + $log.unknownComponent(parents[i], component.name) } if (action.length) { - break; + break } } } } if (action.length) { - action.reverse(); + action.reverse() } - return action; + return action } /** @@ -315,16 +313,16 @@ function getActions(component, name, isEvent) { * @description Execute an action and make some Dependency Injection if it is a core action */ function action(component, state, action, params, isEvent) { - var result = null; - var injectedParams = []; - var componentClassName = ''; - var i = 0; - var length = 0; + let result = null + let injectedParams = [] + let componentClassName = '' + let i = 0 + let length = 0 if (component.constructor.name === 'Function') { - componentClassName = component.name; + componentClassName = component.name } else { - componentClassName = component.constructor.name; + componentClassName = component.constructor.name } if ( @@ -332,29 +330,30 @@ function action(component, state, action, params, isEvent) { !$metamodel.isLink(state, componentClassName) && !$metamodel.isCollection(state, componentClassName) ) { - params = setDefaultValue(componentClassName, state, params); + params = setDefaultValue(componentClassName, state, params) } try { - length = params.length; + length = params.length for (i = 0; i < length; i++) { - injectedParams.push(params[i]); + injectedParams.push(params[i]) } if (action.useCoreAPI) { - injectedParams.push($component); - injectedParams.push($db); - injectedParams.push($metamodel); - injectedParams.push(exports); - injectedParams.push($behavior); - injectedParams.push($state); - injectedParams.push($log); - injectedParams.push($helper); - injectedParams.push($history); - } - - if ($helper.isOnNode()) { - injectedParams.push($helper.getRequire()); + injectedParams.push($component) + injectedParams.push($db) + injectedParams.push($metamodel) + injectedParams.push({ + checkInputNumbers, + checkInput, + checkOutput, + process, + }) + injectedParams.push($behavior) + injectedParams.push($state) + injectedParams.push($log) + injectedParams.push($helper) + injectedParams.push($history) } if (isEvent) { @@ -365,7 +364,7 @@ function action(component, state, action, params, isEvent) { [action.context].concat(injectedParams) ), 0 - ); + ) } else { setTimeout( action.action.bind.apply( @@ -373,18 +372,18 @@ function action(component, state, action, params, isEvent) { [component].concat(injectedParams) ), 0 - ); + ) } } else { if (action.context) { - result = action.action.apply(action.context, injectedParams); + result = action.action.apply(action.context, injectedParams) } else { - result = action.action.apply(component, injectedParams); + result = action.action.apply(component, injectedParams) } } } catch (e) { if (e instanceof RuntimeError) { - throw e; + throw e } else { if (component && component.error) { component.error({ @@ -395,7 +394,7 @@ function action(component, state, action, params, isEvent) { component.id() + "'", stack: e, - }); + }) } if ($helper.getRuntime()) { // do not invoke the error action of the system twice @@ -416,7 +415,7 @@ function action(component, state, action, params, isEvent) { component.id() + "'", stack: e, - }); + }) } $helper.getRuntime().error({ @@ -427,7 +426,7 @@ function action(component, state, action, params, isEvent) { component.id() + "'", stack: e, - }); + }) } $log.actionInvokeError( @@ -435,11 +434,11 @@ function action(component, state, action, params, isEvent) { component.id(), component.constructor.name, e.message - ); + ) } } - return result; + return result } /* Public methods */ @@ -452,63 +451,69 @@ function action(component, state, action, params, isEvent) { * @returns {Boolean} true if the action is the valid number of parameters * @description Check if an action has the valid number of parameter */ -exports.checkInputNumbers = function checkInputNumbers( - className, - state, - action -) { - var func = ''; - var beginBody = -1; - var header = ''; - var funcParams = ''; - var params = []; - var paramNumber = 0; - var modelNumberParam = []; - var isProperty = false; - var isLink = false; - var isCollection = false; - var result = false; +function checkInputNumbers(className, state, action) { + let func = '' + let beginBody = -1 + let header = '' + let funcParams = '' + let params = [] + let paramNumber = 0 + let modelNumberParam = [] + let isProperty = false + let isLink = false + let isCollection = false + let result = false + let isArrowFunction = true // check number of parameters of the action - func = action.toString(); - beginBody = func.indexOf('{'); - header = func.substring(0, beginBody); - header = header.replace('=>', ''); + func = action.toString() + + if (func.trim().indexOf('async') === 0) { + func = func.replace('async', '') + } + + if (func.trim().indexOf('function') === 0) { + isArrowFunction = false + } + + beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{') + header = func.substring(0, beginBody) + header = header.replace('=>', '') if (header.indexOf('(') !== -1) { - funcParams = header.split('(')[1].replace(')', '').trim(); + funcParams = header.split('(')[1].replace(')', '').trim() } else { - funcParams = header.trim(); + funcParams = header.trim() } - params = funcParams.split(','); + params = funcParams.split(',') if (params[0] === '') { - params = []; + params = [] } - paramNumber = params.length; + paramNumber = params.length // get the number min and max of valid parameters - isProperty = $metamodel.isProperty(state, className); - isLink = $metamodel.isLink(state, className); - isCollection = $metamodel.isCollection(state, className); + isProperty = $metamodel.isProperty(state, className) + isLink = $metamodel.isLink(state, className) + isCollection = $metamodel.isCollection(state, className) switch (true) { case isCollection: - modelNumberParam = [2, 2]; - break; + modelNumberParam = [2, 2] + break case isProperty: if ($metamodel.getModelPathType(className, state) === 'array') { - modelNumberParam = [2, 2]; + modelNumberParam = [2, 2] } else { - modelNumberParam = [1, 1]; + modelNumberParam = [1, 1] } - break; + break case isLink: - modelNumberParam = [1, 1]; - break; + modelNumberParam = [1, 1] + break default: - modelNumberParam = getParamNumber(className, state); - break; + modelNumberParam = getParamNumber(className, state) + break } // compare @@ -516,11 +521,11 @@ exports.checkInputNumbers = function checkInputNumbers( modelNumberParam[0] <= paramNumber && paramNumber <= modelNumberParam[1] ) { - result = true; + result = true } - return result; -}; + return result +} /** * @method checkInput @@ -528,34 +533,34 @@ exports.checkInputNumbers = function checkInputNumbers( * @returns {Boolean} true if condition on input are compliant with the model * @description Check if conditions on input are compliant with the model before calling the action */ -exports.checkInput = function checkInput(params) { - params = params || {}; - - var component = params.component || null; - var methodName = params.methodName || ''; - var args = params.args || ''; - var paramsName = []; - var paramsType = []; - var paramsNumber = []; - var componentClassName = ''; - var length = args.length; - var i = 0; - var param = null; - var result = true; - var isProperty = false; - var isLink = false; - var isCollection = false; +function checkInput(params) { + params = params || {} + + let component = params.component || null + let methodName = params.methodName || '' + let args = params.args || '' + let paramsName = [] + let paramsType = [] + let paramsNumber = [] + let componentClassName = '' + let length = args.length + let i = 0 + let param = null + let result = true + let isProperty = false + let isLink = false + let isCollection = false if (component.constructor.name === 'Function') { - componentClassName = component.name; + componentClassName = component.name } else { - componentClassName = component.constructor.name; + componentClassName = component.constructor.name } - isProperty = $metamodel.isProperty(methodName, componentClassName); - isLink = $metamodel.isLink(methodName, componentClassName); - isCollection = $metamodel.isCollection(methodName, componentClassName); - paramsName = getParamNames(componentClassName, methodName); + isProperty = $metamodel.isProperty(methodName, componentClassName) + isLink = $metamodel.isLink(methodName, componentClassName) + isCollection = $metamodel.isCollection(methodName, componentClassName) + paramsName = getParamNames(componentClassName, methodName) switch (true) { case isCollection && methodName.indexOf('.') === -1: @@ -563,88 +568,88 @@ exports.checkInput = function checkInput(params) { paramsType = [ [$metamodel.getModel(componentClassName)[methodName].type[0]], 'string', - ]; + ] } else { paramsType = [ $metamodel.getModel(componentClassName)[methodName].type[0], 'string', - ]; + ] } - paramsNumber = [2, 2]; - break; + paramsNumber = [2, 2] + break case isProperty && methodName.indexOf('.') === -1: if (isModelPath(methodName)) { paramsType = [ $metamodel.getModelPathType(componentClassName, methodName), - ]; + ] } else { - paramsType = [$metamodel.getModel(componentClassName)[methodName].type]; + paramsType = [$metamodel.getModel(componentClassName)[methodName].type] } if ( $metamodel.getModelPathType(componentClassName, methodName) === 'array' ) { if (args && args[1] && args[1] === 'reset') { - paramsType = [['any'], 'string']; + paramsType = [['any'], 'string'] } else { - paramsType = ['any', 'string']; + paramsType = ['any', 'string'] } - paramsNumber = [2, 2]; + paramsNumber = [2, 2] } else { - paramsNumber = [1, 1]; + paramsNumber = [1, 1] } - break; + break case isLink && methodName.indexOf('.') === -1: - paramsType = [$metamodel.getModel(componentClassName)[methodName].type]; - paramsNumber = [1, 1]; - break; + paramsType = [$metamodel.getModel(componentClassName)[methodName].type] + paramsNumber = [1, 1] + break default: - paramsType = getParamTypes(componentClassName, methodName); - paramsNumber = getParamNumber(componentClassName, methodName); - break; + paramsType = getParamTypes(componentClassName, methodName) + paramsNumber = getParamNumber(componentClassName, methodName) + break } // case of object if (typeof length === 'undefined') { - length = 1; + length = 1 } if (length < paramsNumber[0] || paramsNumber[1] < length) { - result = false; + result = false $log.invalidParamNumber( component.id(), component.constructor.name, methodName - ); + ) } for (i = 0; i < length; i++) { - param = args[i]; + param = args[i] if (typeof param === 'undefined') { if (i < paramsNumber[0]) { - result = false; + result = false $log.invalidParamNumber( component.id(), component.constructor.name, methodName - ); + ) } else { - continue; + continue } } else { if (!$metamodel.isValidType(param, paramsType[i])) { - result = false; + result = false $log.invalidParamType( component.id(), component.constructor.name, methodName, paramsName[i] - ); + ) } } } - return result; -}; + return result +} /** * @method checkOutput @@ -652,42 +657,42 @@ exports.checkInput = function checkInput(params) { * @returns {Boolean} true if conditions on ouput are compliant with the metamodel * @description Check if conditions on output are compliant with the metamodel */ -exports.checkOutput = function checkOutput(params) { - params = params || {}; +function checkOutput(params) { + params = params || {} - var component = params.component || null; - var methodName = params.methodName || ''; - var methodResult = null; - var componentClassName = ''; - var returnType = null; - var result = true; + let component = params.component || null + let methodName = params.methodName || '' + let methodResult = null + let componentClassName = '' + let returnType = null + let result = true if (typeof params.methodResult !== 'undefined') { - methodResult = params.methodResult; + methodResult = params.methodResult } else { - methodResult = undefined; + methodResult = undefined } if (component.constructor.name === 'Function') { - componentClassName = component.name; + componentClassName = component.name } else { - componentClassName = component.constructor.name; + componentClassName = component.constructor.name } - returnType = getReturnType(componentClassName, methodName); + returnType = getReturnType(componentClassName, methodName) if (!$metamodel.isValidType(methodResult, returnType)) { - result = false; + result = false $log.invalidResultType( component.id(), component.constructor.name, methodName, typeof returnType === 'string' ? returnType : JSON.stringify(returnType), Array.isArray(methodResult) ? 'array' : typeof methodResult - ); + ) } - return result; -}; + return result +} /** * @method process @@ -697,99 +702,97 @@ exports.checkOutput = function checkOutput(params) { * {Array} data parameters to send to the action * @description Task processing. */ -exports.process = function process(params) { - params = params || {}; - - params.id = params.id || ''; - params.component = params.component || ''; - params.state = params.state || ''; - params.data = params.data || []; - params.context = params.context || null; - - var component = null; - var currentState = ''; - var actions = []; - var result = undefined; - var i = 0; - var length = 0; - var componentClassName = false; - var isProperty = false; - var isLink = false; - var isCollection = false; - var isEvent = false; - var isMethod = false; - var behaviors = []; - var behavior = null; - var actionFromMemory = null; - - currentState = $state.get(params.component); +function process(params) { + params = params || {} + + params.id = params.id || '' + params.component = params.component || '' + params.state = params.state || '' + params.data = params.data || [] + params.context = params.context || null + + let component = null + let currentState = '' + let actions = [] + let result = undefined + let i = 0 + let length = 0 + let componentClassName = false + let isProperty = false + let isLink = false + let isCollection = false + let isEvent = false + let isMethod = false + let behaviors = [] + let behavior = null + let actionFromMemory = null + + currentState = $state.get(params.component) // check state if (currentState && currentState.state === 'destroy') { - $log.invalidUseOfComponent(params.component); + $log.invalidUseOfComponent(params.component) } // case of event processing if (params.id) { - behaviors = $db._Behavior.find({ + behaviors = $db.collections._Behavior.find({ _id: params.id, - }); + }) if (behaviors.length === 0) { - behavior = behaviors[0]; - component = $component.get(behavior.component); + behavior = behaviors[0] + component = $component.get(behavior.component) if (component) { if (component.constructor.name === 'Function') { - componentClassName = component.name; + componentClassName = component.name } else { - componentClassName = component.constructor.name; + componentClassName = component.constructor.name } - isProperty = $metamodel.isProperty(behavior.state, componentClassName); - isLink = $metamodel.isLink(behavior.state, componentClassName); + isProperty = $metamodel.isProperty(behavior.state, componentClassName) + isLink = $metamodel.isLink(behavior.state, componentClassName) isCollection = $metamodel.isCollection( behavior.state, componentClassName - ); - isEvent = $metamodel.isEvent(behavior.state, componentClassName); - isMethod = $metamodel.isMethod(behavior.state, componentClassName); + ) + isEvent = $metamodel.isEvent(behavior.state, componentClassName) + isMethod = $metamodel.isMethod(behavior.state, componentClassName) - actionFromMemory = $behavior.get(params.id); + actionFromMemory = $behavior.get(params.id) if (actionFromMemory) { - action = { + actions.push({ useCoreAPI: behavior.useCoreAPI, context: behavior.context, action: actionFromMemory, - }; - - actions.push(action); + }) } } } } else { - component = $component.get(params.component); + component = $component.get(params.component) if (component) { if (component.constructor.name === 'Function') { - componentClassName = component.name; + componentClassName = component.name } else { - componentClassName = component.constructor.name; + componentClassName = component.constructor.name } - isProperty = $metamodel.isProperty(params.state, componentClassName); - isLink = $metamodel.isLink(params.state, componentClassName); - isCollection = $metamodel.isCollection(params.state, componentClassName); - isEvent = $metamodel.isEvent(params.state, componentClassName); - isMethod = $metamodel.isMethod(params.state, componentClassName); + isProperty = $metamodel.isProperty(params.state, componentClassName) + isLink = $metamodel.isLink(params.state, componentClassName) + isCollection = $metamodel.isCollection(params.state, componentClassName) + isEvent = $metamodel.isEvent(params.state, componentClassName) + isMethod = $metamodel.isMethod(params.state, componentClassName) - actions = getActions(component, params.state, isEvent); + actions = getActions(component, params.state, isEvent) } } if (actions.length) { if ( - exports.checkInput({ + checkInput({ component: component, methodName: params.state, args: params.data, @@ -802,15 +805,15 @@ exports.process = function process(params) { actions[0], params.data, false - ); + ) - exports.checkOutput({ + checkOutput({ component: component, methodName: params.state, methodResult: result, - }); + }) } else { - length = actions.length; + length = actions.length for (i = 0; i < length; i++) { action( params.context || component, @@ -818,17 +821,24 @@ exports.process = function process(params) { actions[i], params.data, true - ); + ) } - $state.set(component.id(), params.state, params.data); + $state.set(component.id(), params.state, params.data) } } } else { if (component && (isEvent || isProperty || isLink || isCollection)) { - $state.set(component.id(), params.state, params.data); + $state.set(component.id(), params.state, params.data) } } - return result; -}; + return result +} + +export default { + checkInputNumbers, + checkInput, + checkOutput, + process, +} diff --git a/tasks/browserify.json b/tasks/browserify.json deleted file mode 100644 index 8cc59ff..0000000 --- a/tasks/browserify.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "debug": { - "src": [ - "src/runtime.js" - ], - "dest": "dist/system-runtime.js", - "options": { - "browserifyOptions": { - "standalone": "runtime", - "debug": true - } - } - }, - "release": { - "src": [ - "src/runtime.js" - ], - "dest": "dist/system-runtime.min.js", - "options": { - "browserifyOptions": { - "standalone": "runtime" - } - } - } -} \ No newline at end of file diff --git a/tasks/clean.json b/tasks/clean.json index 10093b8..d7887cb 100644 --- a/tasks/clean.json +++ b/tasks/clean.json @@ -1,8 +1,3 @@ { - "build": [ - "doc", - "dist", - "build", - "coverage" - ] -} \ No newline at end of file + "build": ["build"] +} diff --git a/tasks/concat.json b/tasks/concat.json index ee807f3..2c909d1 100644 --- a/tasks/concat.json +++ b/tasks/concat.json @@ -1,7 +1,7 @@ { "system": { "files": { - "build/system/system.js": [ + "src/system.js": [ "src/banners/systemmodule-header.txt", "build/system-runtime.json", "src/banners/systemmodule-footer.txt" @@ -10,10 +10,10 @@ }, "license": { "files": { - "dist/system-runtime.min.js": [ + "dist/system-runtime.js": [ "src/banners/license.txt", - "dist/system-runtime.min.js" + "dist/system-runtime.js" ] } } -} \ No newline at end of file +} diff --git a/tasks/eslint.json b/tasks/eslint.json deleted file mode 100644 index 4eb962b..0000000 --- a/tasks/eslint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "files": [ - "src/*.js", - "test/*.js" - ], - "options": { - "overrideConfigFile": ".eslintrc" - } -} \ No newline at end of file diff --git a/tasks/json_merge.json b/tasks/json_merge.json index 96d3971..7bd3aae 100644 --- a/tasks/json_merge.json +++ b/tasks/json_merge.json @@ -1,9 +1,6 @@ { "system": { - "src": [ - "addons/*.json", - "src/system/system-runtime.json" - ], + "src": ["addons/*.json", "src/system/system-runtime.json"], "dest": "build/system-runtime.json" } -} \ No newline at end of file +} diff --git a/tasks/karma.json b/tasks/karma.json deleted file mode 100644 index 6ffb059..0000000 --- a/tasks/karma.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "release": { - "configFile": "karma.conf.js" - } -} \ No newline at end of file diff --git a/tasks/mocha_istanbul.json b/tasks/mocha_istanbul.json deleted file mode 100644 index 2cb9677..0000000 --- a/tasks/mocha_istanbul.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "coverage": { - "src": [ - "test/module", - "test/runtime" - ], - "options": { - "excludes": [ - "src/log.js", - "src/helper.js" - ] - } - }, - "coveralls": { - "src": [ - "test/module", - "test/runtime" - ], - "options": { - "reporter": "spec", - "coverage": true, - "coverageFolder": "coverage", - "excludes": [ - "src/log.js", - "src/helper.js", - "src/mson.js" - ] - } - } -} \ No newline at end of file diff --git a/tasks/uglify.json b/tasks/uglify.json deleted file mode 100644 index 2a7e85d..0000000 --- a/tasks/uglify.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "release": { - "files": { - "dist/<%= pkg.name %>.min.js": [ - "<%= browserify.release.dest %>" - ] - } - } -} \ No newline at end of file diff --git a/tasks/watch.json b/tasks/watch.json deleted file mode 100644 index d3f3f60..0000000 --- a/tasks/watch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "scripts": { - "files": [ - "src/*.js", - "src/system/system-runtime.json" - ], - "tasks": [ - "json_merge", - "concat:system" - ], - "options": { - "spawn": true - } - } -} \ No newline at end of file diff --git a/test/component-spec.js b/test/component-spec.js new file mode 100644 index 0000000..b858b7c --- /dev/null +++ b/test/component-spec.js @@ -0,0 +1,807 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('a System Runtime component', function () { + beforeEach(function () { + runtime.require('logger').level('off') + + runtime.system('component-spec') + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + birthDate: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + location: 'property', + likes: 'property', + custom: 'property', + fullName: 'method', + testMethod: 'method', + children: 'collection', + teacher: 'link', + father: 'link', + moving: 'event', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + birthDate: { + type: 'date', + readOnly: false, + mandatory: false, + default: '1970-01-01T00:00:00.000Z', + }, + children: { + type: ['Person'], + readOnly: false, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + likes: { + type: 'array', + readOnly: false, + mandatory: false, + default: [], + }, + custom: { + type: 'mycustomType', + readOnly: false, + mandatory: false, + default: {}, + }, + fullName: { + result: 'string', + }, + testMethod: {}, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + teacher: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + address: { + type: 'string', + readOnly: false, + mandatory: false, + default: '', + }, + location: { + type: 'location', + readOnly: false, + mandatory: false, + default: {}, + }, + moving: {}, + }) + + metamodel.schema({ + _name: 'Teacher', + _inherit: ['Person'], + }) + + metamodel.type({ + name: 'mycustomType', + description: '', + type: 'object', + schema: { + property0: { + type: 'string', + mandatory: false, + default: '', + }, + property1: { + type: 'array', + mandatory: false, + default: [], + }, + property2: { + type: 'object', + mandatory: false, + default: {}, + }, + property3: { + type: 'any', + mandatory: false, + default: '', + }, + property4: { + type: 'boolean', + mandatory: false, + default: false, + }, + property5: { + type: 'date', + mandatory: false, + default: '', + }, + property6: { + type: 'json', + mandatory: false, + default: {}, + }, + }, + }) + + metamodel.type({ + name: 'street', + description: '', + type: 'object', + schema: { + street: { + type: 'string', + mandatory: false, + default: '', + }, + }, + }) + + metamodel.type({ + name: 'location', + description: '', + type: 'object', + schema: { + cities: { + type: ['street'], + mandatory: false, + default: [], + }, + }, + }) + + metamodel.create() + }) + + it('can show its id', function () { + const id = runtime.id() + + expect(id).equal('runtime') + }) + + it('can require a component', function () { + const db = runtime.require('db') + + expect(db).to.not.be.undefined + }) + + it('can add an event', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + yoda.on('moving', () => this.address('Dagobah')) + yoda.moving() + + setTimeout(function () { + expect(yoda.address()).equal('Dagobah') + done() + }, 10) + }) + + it('can add an event on a new context', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + const luke = new Person({ + firstName: 'Luke', + lastName: '', + likes: [], + }) + + yoda.on('moving', () => this.lastName('Skywalker'), luke) + yoda.moving() + + setTimeout(function () { + expect(luke.lastName()).equal('Skywalker') + done() + }, 10) + }) + + it('can remove an event', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('moving', () => this.address('Dagobah')) + yoda.off('moving') + + yoda.moving() + + setTimeout(function () { + expect(yoda.address()).equal('') + done() + }, 1) + }) + + it('can remove all event', function (done) { + const Person = runtime.require('Person') + const yoda2 = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda2.on('moving', () => this.address('Dagobah')) + yoda2.off() + + yoda2.moving() + + setTimeout(function () { + expect(yoda2.address()).equal('') + done() + }, 1) + }) + + it('can remove an event with its id', function (done) { + const Person = runtime.require('Person') + const yoda3 = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + const behaviorId = yoda3.on('moving', () => this.address('Dagobah')) + + yoda3.require(behaviorId).destroy() + + yoda3.moving() + + setTimeout(function () { + expect(yoda3.address()).equal('') + done() + }, 1) + }) + + it('can add an event on a property change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('lastName', (val) => this.address('Dagobah')) + + yoda.lastName('Grand Jedi Master') + + setTimeout(function () { + expect(yoda.address()).equal('Dagobah') + done() + }, 1) + }) + + it('can use dynamic import', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('lastName', async function (val) { + const newValue = await import('../test/module/test.js') + this.address(newValue.default) + }) + + yoda.lastName('Grand Jedi Master') + + setTimeout(function () { + expect(yoda.address()).equal('Dagobah') + done() + }, 10) + }) + + it('can remove an event on a property change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('lastName', (val) => this.address('Dagobah')) + + yoda.off('lastName') + + yoda.lastName('Grand Jedi Master') + + setTimeout(function () { + expect(yoda.address()).equal('') + done() + }, 1) + }) + + it('can add an event on a structure change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('custom.property0', (val) => this.custom().property3('changed')) + + yoda.custom().property0('some') + + setTimeout(function () { + expect(yoda.custom().property3()).equal('changed') + done() + }, 1) + }) + + it('can remove an event on a structure change', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + yoda.on('custom.property0', (val) => this.custom().property3('changed')) + + yoda.off('custom.property0') + + yoda.custom().property0('some') + + setTimeout(function () { + expect(yoda.custom().property3()).equal('') + done() + }, 1) + }) + + it('can add an event on a specific property of an element of a collection', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + location: { + cities: [{ street: '' }], + }, + }) + + yoda.on('location.cities[0].street', (val) => + this.custom().property0('property changed') + ) + + yoda.location().cities(0).street('a street') + + setTimeout(function () { + expect(yoda.custom().property0()).equal('property changed') + done() + }, 1) + }) + + it('can add an event on a specific property of all elements of a collection', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + location: { + cities: [{ street: '' }], + }, + }) + + yoda.on('location.cities.street', (val) => + this.custom().property0('property changed again') + ) + + yoda.location().cities(0).street('a street') + + setTimeout(function () { + expect(yoda.custom().property0()).equal('property changed again') + done() + }, 1) + }) + + it('can navigate through relationships bewteen components', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children().push(luke) + + const leia = new Person({ + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + leia.father(anakin) + + expect(leia.father().children(0).firstName()).equal('Luke') + }) + + it('can get a property', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + + expect(yoda.firstName()).equal('Yoda') + }) + + it('can set a property', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + yoda.lastName('Grand Jedi Master') + + expect(yoda.lastName()).equal('Grand Jedi Master') + }) + + it('can not set an invalid value', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + yoda.lastName(42) + + expect(yoda.lastName()).equal('Master') + }) + + it('can set a date', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + const now = new Date() + yoda.birthDate(now) + + expect(yoda.birthDate().toISOString()).equal(now.toISOString()) + }) + + it('can add a link to another component', function () { + const Person = runtime.require('Person') + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + const leia = new Person({ + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + leia.father(anakin) + + expect(leia.father().firstName()).equal('Anakin') + }) + + it('can add a link to another component that inherits from the valid class', function () { + const Person = runtime.require('Person') + const Teacher = runtime.require('Teacher') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const yoda = new Teacher({ + firstName: 'Yoda', + lastName: 'Master', + }) + + luke.teacher(yoda) + + expect(luke.teacher()).to.not.be.undefined + }) + + it('can remove a link to another component', function () { + const Person = runtime.require('Person') + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + const leia = new Person({ + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + leia.father(anakin) + leia.father(null) + + expect(leia.father()).equal(undefined) + }) + + it('can add an item in a collection in the config', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + children: [luke], + }) + + expect(anakin.children(0).id()).equal(luke.id()) + }) + + it('can add an item in a collection with api', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children(0, luke) + + expect(anakin.children(0).id()).equal(luke.id()) + }) + + it('can add items in a collection with api', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children([luke, anakin]) + + expect(anakin.children().length).equal(2) + }) + + it('can remove an item of a collection with pop', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + children: [luke], + }) + + expect(anakin.children().pop().id()).equal(luke.id()) + }) + + it('can remove an item of an array property with pop', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + likes: ['saying noooooo!'], + }) + + luke.likes().pop() + + expect(luke.likes().length).equal(0) + }) + + it('can add an item of a collection with push', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children().push(luke) + + expect(anakin.children(0).id()).equal(luke.id()) + }) + + it('can add an item of an array property with push', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + luke.likes().push('saying nooooooo!') + + expect(luke.likes().length).equal(1) + }) + + it('can clear a collection with api', function () { + const Person = runtime.require('Person') + + const luke = new Person({ + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + anakin.children([luke, anakin]) + anakin.children([]) + + expect(anakin.children().length).equal(0) + }) + const Teacher = runtime.require('Teacher') + + it('can add an item in a collection that inherits from the valid class', function () { + const Person = runtime.require('Person') + const Teacher = runtime.require('Teacher') + + const vador = new Person({ + firstName: 'Darth', + lastName: 'Vader', + }) + + const luke = new Teacher({ + firstName: 'Yoda', + lastName: 'Master', + }) + + vador.children(0, luke) + + expect(vador.children(0)).to.not.be.undefined + }) + + it('can destroy itself', function () { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + }) + const id = yoda.id() + yoda.destroy() + + expect(runtime.require(id)).equal(undefined) + }) + + it('can destroy a class', function () { + const Person = runtime.require('Person') + Person.destroy() + + const result = runtime.require('Person') + expect(result).equal(undefined) + }) + + it('can create a core object', function () { + const Person = runtime.require('Person') + const shadow = new Person({ + firstName: 'Shadow', + lastName: 'Object', + _core: true, + }) + + expect(runtime.bundle().indexOf('Shadow')).equal(-1) + }) + + it('can call a parent method', function () { + const Person = runtime.require('Person') + const Teacher = runtime.require('Teacher') + + Person.on('fullName', () => this.firstName() + ' ' + this.lastName()) + + Teacher.on( + 'fullName', + () => 'Great Teacher ' + this.require('Person').fullName(this) + ) + + const eikichi = new Teacher({ + firstName: 'Eikichi', + lastName: 'Onizuka', + }) + + expect(eikichi.fullName()).equal('Great Teacher Eikichi Onizuka') + }) + + it('can send an error catched by the runtime', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + _id: 'yoda', + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + runtime.on('error', (data) => this.require('yoda').lastName('error')) + + yoda.on('testMethod', () => ANonDefinedFunction()) + yoda.testMethod() + + setTimeout(function () { + expect(yoda.lastName()).equal('error') + done() + }, 1) + }) + + it('can send an error catched by a component', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + yoda.on('error', (data) => this.lastName('error')) + + yoda.on('testMethod', () => ANonDefinedFunction()) + yoda.testMethod() + + setTimeout(function () { + expect(yoda.lastName()).equal('error') + done() + }, 1) + }) + + it('can send an error catched by the system', function (done) { + const Person = runtime.require('Person') + const yoda = new Person({ + _id: 'yoda1', + firstName: 'Yoda', + lastName: 'Master', + likes: ['teaching'], + }) + + runtime + .system() + .on('error', (data) => this.require('yoda1').lastName('error')) + + yoda.on('testMethod', () => ANonDefinedFunction()) + yoda.testMethod() + + setTimeout(function () { + expect(yoda.lastName()).equal('error') + done() + }, 1) + }) +}) diff --git a/test/database-spec.js b/test/database-spec.js new file mode 100644 index 0000000..a46624e --- /dev/null +++ b/test/database-spec.js @@ -0,0 +1,10 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('System Runtime db component', function () { + it('exists', function () { + const db = runtime.require('db') + + expect(db).to.not.be.undefined + }) +}) diff --git a/test/db-spec.js b/test/db-spec.js new file mode 100644 index 0000000..f6951c3 --- /dev/null +++ b/test/db-spec.js @@ -0,0 +1,364 @@ +import db from '../src/db.js' +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('System Runtime db component', function () { + // init + // eslint-disable-next-line mocha/no-setup-in-describe + runtime.system('test') + + it('can find all documents of a collection', function () { + const result = db.collections._Runtime.find() + + expect(result.length > 0).equal(true) + }) + + it('can find a document with a criteria', function () { + const result = db.collections._Runtime.find({ + _id: 'runtime', + }) + + expect(result.length).equal(1) + }) + + it('can find a document with multi criteria', function () { + const result = db.collections._Runtime.find([ + { + _id: 'runtime', + }, + ]) + + expect(result.length).equal(1) + }) + + it('can find a document with regex criteria', function () { + const result = db.collections._Runtime.find({ + _id: /runtime/, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $eq selector', function () { + const result = db.collections._Runtime.find({ + _id: { + $eq: 'runtime', + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $eq selector and regexp', function () { + const result = db.collections._Runtime.find({ + _id: { + $eq: /runtime/, + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $ne selector', function () { + const result = db.collections._Runtime.find({ + version: { + $ne: '1.0.0', + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $gt selector', function () { + const result = db.collections._Runtime.find({ + version: { + $gt: '1.0.0', + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $gte selector', function () { + const result = db.collections._Runtime.find({ + version: { + $gte: '1.0.0', + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $lt selector', function () { + const result = db.collections._Runtime.find({ + version: { + $lt: '9.0.0', + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $lte selector', function () { + const result = db.collections._Runtime.find({ + version: { + $lte: '9.0.0', + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $in selector', function () { + const result = db.collections._Runtime.find({ + _id: { + $in: [42, false, 'runtime'], + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with a $nin selector', function () { + const result = db.collections._Runtime.find({ + _id: { + $nin: [42, false], + }, + }) + + expect(result.length).equal(1) + }) + + it('can find a document with multiple selectors', function () { + const result = db.collections._Runtime.find({ + _id: { + $nin: [''], + $eq: 'runtime', + }, + }) + + expect(result.length).equal(1) + }) + + it('can sort the result of a find', function () { + // TODO improve test + const result = db.collections._Runtime + .find({ + _id: 'runtime', + }) + .sort({ + _id: -1, + }) + + expect(result.length).equal(1) + }) + + it('can add a document', function () { + let docAdded = db.collections._Runtime.insert({ + _id: 'runtime1', + version: '0.0.0', + }) + + expect(docAdded[0]).equal('runtime1') + + // try to insert an invalid document + let invalidDoc = db.collections._Runtime.insert(null) + + expect(invalidDoc.length).equal(0) + + // try to insert the same document + docAdded = db.collections._Runtime.insert({ + _id: 'runtime1', + version: '0.0.0', + }) + + expect(docAdded[0]).equal('runtime1') + + const result = db.collections._Runtime.find({ + _id: 'runtime1', + }) + + expect(result.length).equal(1) + }) + + it('can add many documents', function () { + db.collections._Runtime.insert([ + { + _id: 'runtime2', + version: '0.0.0', + }, + { + _id: 'runtime3', + version: '0.0.0', + }, + ]) + const result = db.collections._Runtime.find({ + _id: 'runtime2', + }) + + expect(result.length).equal(1) + }) + + it('can update a document', function () { + const updatedDoc = db.collections._Runtime.update( + { + _id: 'runtime1', + }, + { + version: '0.0.4', + } + ) + + expect(updatedDoc[0]).equal('runtime1') + + const result = db.collections._Runtime.find({ + _id: 'runtime1', + })[0] + + expect(result.version).equal('0.0.4') + }) + + it('can update many documents', function () { + const updatedDoc = db.collections._Runtime.update( + [ + { + _id: 'runtime2', + }, + { + _id: 'runtime3', + }, + ], + { + version: '0.0.4', + } + ) + + expect(updatedDoc.length).equal(2) + expect(updatedDoc[0]).equal('runtime2') + expect(updatedDoc[1]).equal('runtime3') + + const result = db.collections._Runtime.find({ + _id: 'runtime3', + })[0] + + expect(result.version).equal('0.0.4') + }) + + it('can update a document that does not exist', function () { + db.collections._Runtime.update( + { + _id: 'runtime5', + }, + { + version: '0.0.1', + }, + { + upsert: true, + } + ) + const result = db.collections._Runtime.find({ + _id: 'runtime5', + }) + + expect(result.length).equal(1) + }) + + it('can remove a document', function () { + const runtimeid = 'runtime' + Math.round(Math.random() * 1000000) + db.collections._Runtime.insert({ + _id: runtimeid, + version: '0.0.0', + }) + + const removedDocument = db.collections._Runtime.remove({ + _id: runtimeid, + }) + + expect(removedDocument[0]).equal(runtimeid) + + const result = db.collections._Runtime.find({ + _id: runtimeid, + }) + + expect(result.length).equal(0) + }) + + it('can remove many documents', function () { + const runtimeid1 = 'runtime' + Math.round(Math.random() * 1000000) + const runtimeid2 = 'runtime' + Math.round(Math.random() * 1000000) + + db.collections._Runtime.insert([ + { + _id: runtimeid1, + version: '0.0.0', + }, + { + _id: runtimeid2, + version: '0.0.0', + }, + ]) + const removedDocument = db.collections._Runtime.remove([ + { + _id: runtimeid1, + }, + { + _id: runtimeid2, + }, + ]) + + expect(removedDocument.length).equal(2) + expect(removedDocument[0]).equal(runtimeid1) + expect(removedDocument[1]).equal(runtimeid2) + + const result1 = db.collections._Runtime.find({ + _id: runtimeid1, + }) + const result2 = db.collections._Runtime.find({ + _id: runtimeid2, + }) + + expect(result1.length + result2.length).equal(0) + }) + + it('can export the database', function () { + const result = db.exportSystem() + + expect(result).to.not.be.undefined + }) + + it('can apply a filter on the export', function () { + const result = db.exportSystem({ + schemas: { + name: 'Person', + }, + }) + + expect(result).to.not.be.undefined + }) + + it('can import a system', function () { + const result = db.importSystem({ + _id: 'u195cc1c1dd16c47', + name: 'test2', + description: '', + version: '0.0.1', + master: true, + schemas: {}, + models: {}, + types: {}, + behaviors: {}, + components: {}, + }) + + expect(result).not.equal('') + }) + + it('can init the database', function () { + db.init() + const result = db.collections._Runtime.find({ + _id: 'runtime', + }) + + expect(result.length).equal(1) + }) +}) diff --git a/test/history-spec.js b/test/history-spec.js new file mode 100644 index 0000000..3d33d6c --- /dev/null +++ b/test/history-spec.js @@ -0,0 +1,198 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('System Runtime history component', function () { + beforeEach(function () { + const history = runtime.require('history') + history.start() + }) + + afterEach(function () { + const history = runtime.require('history') + history.stop() + }) + + it('exists', function () { + const history = runtime.require('history') + + expect(history).to.not.be.undefined + }) + + it('can go back', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema({ + _name: 'PersonHistoryTest1', + _inherit: ['_Component'], + firstName: 'property', + }) + + metamodel.model({ + _name: 'PersonHistoryTest1', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + }) + + metamodel.create() + + expect(metamodel.require('PersonHistoryTest1')).to.not.be.undefined + + const Person = runtime.require('PersonHistoryTest1') + + // insert + new Person({ + firstName: 'Yoda', + }) + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(1) + + const history = runtime.require('history') + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(0) + + // update + const yoda = new Person({ + firstName: 'Yoda', + }) + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(1) + + yoda.firstName('none') + + history.from(-1) + history.back() + + expect(yoda.firstName()).equal('Yoda') + + // remove + yoda.destroy() + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest1.find().length + ).equal(1) + }) + + it('can go forward', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema({ + _name: 'PersonHistoryTest2', + _inherit: ['_Component'], + firstName: 'property', + }) + + metamodel.model({ + _name: 'PersonHistoryTest2', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + }) + + metamodel.create() + + expect(metamodel.require('PersonHistoryTest2')).to.not.be.undefined + + const Person = runtime.require('PersonHistoryTest2') + + // remove + const yoda = new Person({ + firstName: 'Yoda', + }) + yoda.destroy() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(0) + + const history = runtime.require('history') + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(1) + + history.forward() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(0) + + // update + const yoda1 = new Person({ + firstName: 'Yoda', + }) + yoda1.firstName('none') + + history.from(-1) + history.back() + + expect(yoda1.firstName()).equal('Yoda') + + history.forward() + + expect(yoda1.firstName()).equal('none') + + // insert + new Person({ + firstName: 'Yoda', + }) + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(2) + + history.from(-1) + history.back() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(1) + + history.forward() + + expect( + runtime.require('db').collections().PersonHistoryTest2.find().length + ).equal(2) + }) + + it('can get an item of the history', function () { + const history = runtime.require('history') + const item = history.get(0) + + expect(item.action).to.not.be.undefined + }) + + it('can dump all the history', function () { + const history = runtime.require('history') + + expect(history.dump()).to.not.be.undefined + }) + + it('can load a dump of an history', function () { + const history = runtime.require('history') + const dump = history.dump() + + expect(history.load(dump)).equal(true) + }) +}) diff --git a/test/metamodel-spec.js b/test/metamodel-spec.js new file mode 100644 index 0000000..b022ac6 --- /dev/null +++ b/test/metamodel-spec.js @@ -0,0 +1,593 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('System Runtime metamodel component', function () { + it('exists', function () { + const metamodel = runtime.require('metamodel') + + expect(metamodel).to.not.be.undefined + }) + + it('can add a schema', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema({ + _name: 'PersonTest', + _inherit: ['_Component'], + firstName: 'property', + }) + + metamodel.model({ + _name: 'PersonTest', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + }) + + metamodel.create() + + expect(metamodel.require('PersonTest')).to.not.be.undefined + }) + + it('can update a generated model (simple mode)', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema('PersonTestSimple', { + firstName: 'property', + }) + + metamodel.model('PersonTestSimple', { + firstName: 'string', + }) + + metamodel.create() + + expect(metamodel.require('PersonTestSimple')).to.not.be.undefined + }) + + it('can update a method signature (simple mode)', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema('MethodTest', { + add: 'method', + }) + + metamodel.model('MethodTest', { + add: { + p1: 'number', + p2: 'number', + '=>': 'number', + }, + }) + + metamodel.create() + + let MethodTest = runtime.require('MethodTest') + + MethodTest.on('add', (p1, p2) => p1 + p2) + + let test = new MethodTest() + + expect(test.add(1, 2)).equal(3) + }) + + it('can add a type', function () { + const metamodel = runtime.require('metamodel') + + metamodel.type({ + name: 'address', + type: 'object', + schema: { + planet: { type: 'string', mandatory: true }, + }, + }) + + metamodel.type({ + name: 'sex', + type: 'string', + value: ['male', 'female'], + }) + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const yoda = new Person({ + sex: 'male', + firstName: 'Yoda', + lastName: 'Master', + address: { + planet: 'Dagobah', + }, + }) + + expect(yoda.address().planet()).equal('Dagobah') + }) + + it('can add a type (simple mode)', function () { + const metamodel = runtime.require('metamodel') + metamodel.schema('PersonTestSimple2', { + firstName: 'property', + address: 'property', + }) + + metamodel.model('PersonTestSimple2', { + firstName: 'string', + address: 'address2', + }) + + metamodel.type('address2', { + address: 'string', + city: 'city', + }) + + metamodel.type('city', ['Paris', 'Rennes']) + + metamodel.create() + + let PersonTestSimple2 = runtime.require('PersonTestSimple2') + + let person = new PersonTestSimple2({ + firstName: 'a name', + address: { + address: 'an address', + city: 'Paris', + }, + }) + + expect(person.address().city()).equal('Paris') + }) + + it('can create a collection of structure', function () { + const metamodel = runtime.require('metamodel') + + metamodel.type({ + name: 'vegetable', + type: 'object', + schema: { + kind: { type: ['string'], mandatory: true }, + }, + }) + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + firstName: 'property', + lastName: 'property', + eats: 'collection', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + eats: { + type: ['vegetable'], + readOnly: true, + mandatory: false, + default: [], + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const yoda = new Person({ + sex: 'male', + firstName: 'Yoda', + lastName: 'Master', + eats: [ + { + kind: ['all'], + }, + ], + }) + + expect(yoda.eats(0).kind(0)).equal('all') + }) + + it('can create a complex structure', function () { + const metamodel = runtime.require('metamodel') + + metamodel.type({ + name: 'foods', + type: 'object', + schema: { + vegetables: { type: 'vegetable', mandatory: true }, + }, + }) + + metamodel.type({ + name: 'vegetable', + type: 'object', + schema: { + kind: { type: ['string'], mandatory: true }, + }, + }) + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + firstName: 'property', + lastName: 'property', + likes: 'property', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + likes: { + type: 'foods', + readOnly: true, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const yoda = new Person({ + sex: 'male', + firstName: 'Yoda', + lastName: 'Master', + likes: { + vegetables: { + kind: ['all'], + }, + }, + }) + + expect(yoda.likes().vegetables().kind(0)).equal('all') + }) + + it('can create a one to one relationship', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + father: 'link', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const anakin = new Person({ + sex: 'male', + firstName: 'Anakin', + lastName: 'Skywalker', + }) + + const luke = new Person({ + sex: 'male', + firstName: 'Luke', + lastName: 'Skywalkers', + father: anakin, + }) + + expect(luke.father().firstName()).equal('Anakin') + }) + + it('can create a one to many relationship', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + children: 'collection', + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + father: 'link', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + children: { + type: ['Person'], + readOnly: true, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const leia = new Person({ + sex: 'female', + firstName: 'Leia Amidala', + lastName: 'Skywalker', + }) + + const luke = new Person({ + sex: 'male', + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const padme = new Person({ + sex: 'female', + firstName: 'Padme', + lastName: 'Amidala', + children: [luke, leia], + }) + + expect(padme.children(1).firstName()).equal('Leia Amidala') + }) + + it('can generate APIs to navigate through the model', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person', + _inherit: ['_Component'], + children: 'collection', + sex: 'property', + firstName: 'property', + lastName: 'property', + address: 'property', + father: 'link', + son: 'property', + }) + + metamodel.model({ + _name: 'Person', + _inherit: ['_Component'], + sex: { + type: 'sex', + readOnly: true, + mandatory: true, + default: 'male', + }, + children: { + type: ['Person'], + readOnly: true, + mandatory: false, + default: [], + }, + firstName: { + type: 'string', + readOnly: false, + mandatory: true, + default: '', + }, + lastName: { + type: 'string', + readOnly: true, + mandatory: true, + default: '', + }, + father: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + address: { + type: 'address', + readOnly: true, + mandatory: false, + default: { + planet: '', + }, + }, + son: { + type: 'Person', + readOnly: false, + mandatory: false, + default: {}, + }, + }) + + metamodel.create() + + const Person = runtime.require('Person') + + const luke = new Person({ + sex: 'male', + firstName: 'Luke', + lastName: 'Skywalker', + }) + + const anakin = new Person({ + sex: 'male', + firstName: 'Anakin', + lastName: 'Skywalker', + son: luke, + }) + + const leia = new Person({ + sex: 'female', + firstName: 'Leia Amidala', + lastName: 'Skywalker', + father: anakin, + }) + + expect(leia.father().son().firstName()).equal('Luke') + }) + + it('can generate empty method', function () { + const metamodel = runtime.require('metamodel') + + // create the schema + metamodel.schema('PersonSimple', { + firstName: 'property', + lastName: 'property', + age: 'property', + father: 'link', + mother: 'link', + children: 'collection', + fullName: 'method', + }) + + // override the generated model + metamodel.model('PersonSimple', { + firstName: 'string', + lastName: 'string', + age: 'number', + father: 'Person', + mother: 'Person', + children: ['Person'], + fullName: { + '=>': 'string', + }, + }) + + // create the model and related class + metamodel.create() + + const PersonSimple = runtime.require('PersonSimple') + const person = new PersonSimple({ + firstName: 'a first name', + mother: '', + children: [], + }) + + expect(person.fullName()).equal(undefined) + }) +}) diff --git a/test/module/db-spec.js b/test/module/db-spec.js deleted file mode 100644 index 45e1591..0000000 --- a/test/module/db-spec.js +++ /dev/null @@ -1,338 +0,0 @@ -const db = require('../../src/db.js'); -const runtime = require('../../src/runtime.js'); -const expect = require('chai').expect; - -describe('System Runtime db component', () => { - - // init - runtime.system('test'); - - it('can find all documents of a collection', () => { - const result = db._Runtime.find(); - - expect(result.length > 0).equal(true); - }); - - it('can find a document with a criteria', () => { - const result = db._Runtime.find({ - '_id': 'runtime' - }); - - expect(result.length).equal(1); - }); - - it('can find a document with multi criteria', () => { - const result = db._Runtime.find([{ - '_id': 'runtime' - }]); - - expect(result.length).equal(1); - }); - - it('can find a document with regex criteria', () => { - const result = db._Runtime.find({ - '_id': /runtime/ - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $eq selector', () => { - const result = db._Runtime.find({ - '_id': { - '$eq': 'runtime' - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $eq selector and regexp', () => { - const result = db._Runtime.find({ - '_id': { - '$eq': /runtime/ - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $ne selector', () => { - const result = db._Runtime.find({ - 'version': { - '$ne': '1.0.0' - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $gt selector', () => { - const result = db._Runtime.find({ - 'version': { - '$gt': '1.0.0' - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $gte selector', () => { - const result = db._Runtime.find({ - 'version': { - '$gte': '1.0.0' - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $lt selector', () => { - const result = db._Runtime.find({ - 'version': { - '$lt': '9.0.0' - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $lte selector', () => { - const result = db._Runtime.find({ - 'version': { - '$lte': '9.0.0' - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $in selector', () => { - const result = db._Runtime.find({ - '_id': { - '$in': [42, false, 'runtime'] - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with a $nin selector', () => { - const result = db._Runtime.find({ - '_id': { - '$nin': [42, false] - } - }); - - expect(result.length).equal(1); - }); - - it('can find a document with multiple selectors', () => { - const result = db._Runtime.find({ - '_id': { - '$nin': [''], - '$eq': 'runtime' - } - }); - - expect(result.length).equal(1); - }); - - it('can sort the result of a find', () => { - // TODO improve test - const result = db._Runtime.find({ - '_id': 'runtime' - }).sort({ - '_id': -1 - }); - - expect(result.length).equal(1); - }); - - it('can add a document', () => { - let docAdded = db._Runtime.insert({ - '_id': 'runtime1', - 'version': '0.0.0' - }); - - expect(docAdded[0]).equal('runtime1'); - - // try to insert an invalid document - let invalidDoc = db._Runtime.insert(null); - - expect(invalidDoc.length).equal(0); - - // try to insert the same document - docAdded = db._Runtime.insert({ - '_id': 'runtime1', - 'version': '0.0.0' - }); - - expect(docAdded[0]).equal('runtime1'); - - const result = db._Runtime.find({ - '_id': 'runtime1' - }); - - expect(result.length).equal(1); - }); - - it('can add many documents', () => { - db._Runtime.insert([{ - '_id': 'runtime2', - 'version': '0.0.0' - }, { - '_id': 'runtime3', - 'version': '0.0.0' - }]); - const result = db._Runtime.find({ - '_id': 'runtime2' - }); - - expect(result.length).equal(1); - }); - - it('can update a document', () => { - const updatedDoc = db._Runtime.update({ - '_id': 'runtime1' - }, { - 'version': '0.0.4' - }); - - expect(updatedDoc[0]).equal('runtime1'); - - const result = db._Runtime.find({ - '_id': 'runtime1' - })[0]; - - expect(result.version).equal('0.0.4'); - }); - - it('can update many documents', () => { - const updatedDoc = db._Runtime.update([{ - '_id': 'runtime2' - }, { - '_id': 'runtime3' - }], { - 'version': '0.0.4' - }); - - expect(updatedDoc.length).equal(2); - expect(updatedDoc[0]).equal('runtime2'); - expect(updatedDoc[1]).equal('runtime3'); - - const result = db._Runtime.find({ - '_id': 'runtime3' - })[0]; - - expect(result.version).equal('0.0.4'); - }); - - it('can update a document that does not exist', () => { - db._Runtime.update({ - '_id': 'runtime5' - }, { - 'version': '0.0.1' - }, { - 'upsert': true - }); - const result = db._Runtime.find({ - '_id': 'runtime5' - }); - - expect(result.length).equal(1); - }); - - it('can remove a document', () => { - const runtimeid = 'runtime' + Math.round(Math.random() * 1000000); - db._Runtime.insert({ - '_id': runtimeid, - 'version': '0.0.0' - }); - - const removedDocument = db._Runtime.remove({ - '_id': runtimeid - }); - - expect(removedDocument[0]).equal(runtimeid); - - const result = db._Runtime.find({ - '_id': runtimeid - }); - - expect(result.length).equal(0); - }); - - it('can remove many documents', () => { - const runtimeid1 = 'runtime' + Math.round(Math.random() * 1000000); - const runtimeid2 = 'runtime' + Math.round(Math.random() * 1000000); - - db._Runtime.insert([{ - '_id': runtimeid1, - 'version': '0.0.0' - }, { - '_id': runtimeid2, - 'version': '0.0.0' - }]); - const removedDocument = db._Runtime.remove([{ - '_id': runtimeid1 - }, { - '_id': runtimeid2 - }]); - - expect(removedDocument.length).equal(2); - expect(removedDocument[0]).equal(runtimeid1); - expect(removedDocument[1]).equal(runtimeid2); - - const result1 = db._Runtime.find({ - '_id': runtimeid1 - }); - const result2 = db._Runtime.find({ - '_id': runtimeid2 - }); - - expect(result1.length + result2.length).equal(0); - }); - - it('can export the database', () => { - const result = db.exportSystem(); - - expect(result).to.not.be.undefined; - }); - - it('can apply a filter on the export', () => { - const result = db.exportSystem({ - 'schemas': { - 'name': 'Person' - } - }); - - expect(result).to.not.be.undefined; - }); - - it('can import a system', () => { - const result = db.importSystem({ - '_id': 'u195cc1c1dd16c47', - 'name': 'test2', - 'description': '', - 'version': '0.0.1', - 'master': true, - 'schemas': {}, - 'models': {}, - 'types': {}, - 'behaviors': {}, - 'components': {} - }); - - expect(result).not.equal(''); - }); - - it('can init the database', () => { - db.init(); - const result = db._Runtime.find({ - '_id': 'runtime' - }); - - expect(result.length).equal(1); - }); -}); diff --git a/test/module/test.js b/test/module/test.js new file mode 100644 index 0000000..82a7b05 --- /dev/null +++ b/test/module/test.js @@ -0,0 +1,3 @@ +const newValue = 'Dagobah' + +export default newValue diff --git a/test/mson-spec.js b/test/mson-spec.js new file mode 100644 index 0000000..cadee7d --- /dev/null +++ b/test/mson-spec.js @@ -0,0 +1,117 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('a MSON schema', function () { + it('can make inheritance at schema level', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'Person_test', + _inherit: ['_Component'], + firstName: 'property', + lastName: 'property', + getFullName: 'method', + }) + + metamodel.schema({ + _name: 'Teacher_test', + _inherit: ['Person_test'], + }) + + metamodel.create() + + const Person = runtime.require('Person_test') + + Person.off('getFullName') + + Person.on('getFullName', () => this.firstName() + ' ' + this.lastName()) + + const Teacher = runtime.require('Teacher_test') + + const eikichi = new Teacher({ + firstName: 'Eikichi', + lastName: 'Onizuka', + }) + + expect(eikichi.getFullName()).equal('Eikichi Onizuka') + }) + + it('implements C3 superclass linearization algorithm', function () { + const metamodel = runtime.require('metamodel') + + metamodel.schema({ + _name: 'TestResult', + getParent: 'method', + }) + + metamodel.model({ + _name: 'TestResult', + getParent: { + params: [], + result: 'array', + }, + }) + + metamodel.schema({ + _name: 'O', + _inherit: [], + }) + + metamodel.schema({ + _name: 'A', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'B', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'C', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'D', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'E', + _inherit: ['O'], + }) + + metamodel.schema({ + _name: 'K1', + _inherit: ['A', 'B', 'C'], + }) + + metamodel.schema({ + _name: 'K2', + _inherit: ['D', 'B', 'E'], + }) + + metamodel.schema({ + _name: 'K3', + _inherit: ['D', 'A'], + }) + + metamodel.schema({ + _name: 'Z', + _inherit: ['K1', 'K2', 'K3'], + }) + + metamodel.create() + + const TestResult = runtime.require('TestResult') + // eslint-disable-next-line no-undef + TestResult.on('getParent', () => $metamodel.getParents('Z'), true) + + const test = new TestResult() + + expect(test.getParent().join('_')).equal( + ['K1', 'K2', 'K3', 'D', 'A', 'B', 'C', 'E', 'O'].join('_') + ) + }) +}) diff --git a/test/runtime-spec.js b/test/runtime-spec.js new file mode 100644 index 0000000..f71f0bb --- /dev/null +++ b/test/runtime-spec.js @@ -0,0 +1,102 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('System Runtime runtime component', function () { + it('exists', function () { + expect(runtime).to.not.be.undefined + }) + + it('can get its version', function () { + const version = runtime.version() + + expect(typeof version).equal('string') + }) + + it('can create a system', function () { + const id = runtime.system('a system') + + expect(id).to.not.be.undefined + }) + + it('can bundle a system', function () { + const bundle = runtime.bundle() + + expect(bundle).to.not.be.undefined + }) + + it('can get the status of all installed bundles', function () { + const status = runtime.status() + + expect(status).to.not.be.undefined + }) + + it('can install a bundle', function () { + const systemId = runtime.install({ + name: 'Test', + master: true, + version: '0.0.1', + description: '', + schemas: { + k141cc1821c1b775: { + _id: 'k141cc1821c1b775', + _name: 'TestSchema', + _inherit: ['_Component'], + }, + }, + models: { + b19c171575f1824b: { + _id: 'b19c171575f1824b', + _name: 'TestSchema', + _description: '', + }, + }, + behaviors: { + n1e72b1ed051cf36: { + _id: 'n1e72b1ed051cf36', + component: 'k16d101760d1ec2a', + state: 'start', + action: 'function start() { \n \n}', + useCoreAPI: false, + core: false, + }, + }, + types: { + TestType: { + _id: 'o1cf651e05613735', + name: 'TestType', + description: '', + type: 'object', + schema: { + property1: { + type: 'any', + mandatory: false, + default: '', + }, + property2: { + type: 'any', + mandatory: false, + default: '', + }, + }, + }, + }, + components: { + TestSchema: { + z1f91a1beb01f48f: { + _id: 'z1f91a1beb01f48f', + }, + }, + }, + _id: 'k16d101760d1ec2a', + }) + + expect(systemId).equal('k16d101760d1ec2a') + }) + + it('can uninstall a bundle', function () { + runtime.uninstall('k16d101760d1ec2a') + const state = runtime.require('k16d101760d1ec2a').state() + + expect(state).equal('uninstalled') + }) +}) diff --git a/test/runtime/component-spec.js b/test/runtime/component-spec.js deleted file mode 100644 index 2299efa..0000000 --- a/test/runtime/component-spec.js +++ /dev/null @@ -1,820 +0,0 @@ -describe('a System Runtime component', function () { - - // init - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - - beforeEach(function () { - runtime.require('logger').level('off'); - - runtime.system('component-spec'); - const metamodel = runtime.require('metamodel'); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'birthDate': 'property', - 'firstName': 'property', - 'lastName': 'property', - 'address': 'property', - 'location': 'property', - 'likes': 'property', - 'custom': 'property', - 'fullName': 'method', - 'testMethod': 'method', - 'children': 'collection', - 'teacher': 'link', - 'father': 'link', - 'moving': 'event' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'birthDate': { - 'type': 'date', - 'readOnly': false, - 'mandatory': false, - 'default': '1970-01-01T00:00:00.000Z' - }, - 'children': { - 'type': ['Person'], - 'readOnly': false, - 'mandatory': false, - 'default': [] - }, - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'likes': { - 'type': 'array', - 'readOnly': false, - 'mandatory': false, - 'default': [] - }, - 'custom': { - 'type': 'mycustomType', - 'readOnly': false, - 'mandatory': false, - 'default': {} - }, - 'fullName': { - 'result': 'string' - }, - 'testMethod': { - }, - 'father': { - 'type': 'Person', - 'readOnly': false, - 'mandatory': false, - 'default': {} - }, - 'teacher': { - 'type': 'Person', - 'readOnly': false, - 'mandatory': false, - 'default': {} - }, - 'address': { - 'type': 'string', - 'readOnly': false, - 'mandatory': false, - 'default': '' - }, - 'location': { - 'type': 'location', - 'readOnly': false, - 'mandatory': false, - 'default': {} - }, - 'moving': {} - }); - - metamodel.schema({ - '_name': 'Teacher', - '_inherit': ['Person'] - }); - - metamodel.type({ - "name": "mycustomType", - "description": "", - "type": "object", - "schema": { - "property0": { - "type": "string", - "mandatory": false, - "default": '' - }, - "property1": { - "type": "array", - "mandatory": false, - "default": [] - }, - "property2": { - "type": "object", - "mandatory": false, - "default": {} - }, - "property3": { - "type": "any", - "mandatory": false, - "default": '' - }, - "property4": { - "type": "boolean", - "mandatory": false, - "default": false - }, - "property5": { - "type": "date", - "mandatory": false, - "default": "" - }, - "property6": { - "type": "json", - "mandatory": false, - "default": {} - } - } - }); - - metamodel.type({ - "name": "street", - "description": "", - "type": "object", - "schema": { - "street": { - "type": "string", - "mandatory": false, - "default": "" - } - } - }); - - metamodel.type({ - "name": "location", - "description": "", - "type": "object", - "schema": { - "cities": { - "type": ["street"], - "mandatory": false, - "default": [] - } - } - }); - - metamodel.create(); - }); - - it('can show its id', function () { - const id = runtime.id(); - - expect(id).equal('runtime'); - }); - - it('can require a component', function () { - const db = runtime.require('db'); - - expect(db).to.not.be.undefined; - }); - - it('can add an event', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master', - 'likes': ['teaching'] - }); - - yoda.on('moving', function () { - this.address('Dagobah'); - }); - yoda.moving(); - - setTimeout(function () { - expect(yoda.address()).equal('Dagobah'); - done(); - }, 10); - }); - - it('can add an event on a new context', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master', - 'likes': ['teaching'] - }); - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': '', - 'likes': [] - }); - - yoda.on('moving', function () { - this.lastName('Skywalker'); - }, luke); - yoda.moving(); - - setTimeout(function () { - expect(luke.lastName()).equal('Skywalker'); - done(); - }, 10); - }); - - it('can remove an event', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - yoda.on('moving', function () { - this.address('Dagobah'); - }); - yoda.off('moving'); - - yoda.moving(); - - setTimeout(function () { - expect(yoda.address()).equal(''); - done(); - }, 1); - }); - - it('can remove all event', function (done) { - const Person = runtime.require('Person'); - const yoda2 = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - yoda2.on('moving', function () { - this.address('Dagobah'); - }); - yoda2.off(); - - yoda2.moving(); - - setTimeout(function () { - expect(yoda2.address()).equal(''); - done(); - }, 1); - }); - - it('can remove an event with its id', function (done) { - const Person = runtime.require('Person'); - const yoda3 = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - const behaviorId = yoda3.on('moving', function () { - this.address('Dagobah'); - }); - - yoda3.require(behaviorId).destroy(); - - yoda3.moving(); - - setTimeout(function () { - expect(yoda3.address()).equal(''); - done(); - }, 1); - }); - - it('can add an event on a property change', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - yoda.on('lastName', function (val) { - this.address('Dagobah'); - }); - - yoda.lastName('Grand Jedi Master'); - - setTimeout(function () { - expect(yoda.address()).equal('Dagobah'); - done(); - }, 1); - }); - - it('can remove an event on a property change', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - yoda.on('lastName', function (val) { - this.address('Dagobah'); - }); - - yoda.off('lastName'); - - yoda.lastName('Grand Jedi Master'); - - setTimeout(function () { - expect(yoda.address()).equal(''); - done(); - }, 1); - }); - - it('can add an event on a structure change', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - yoda.on('custom.property0', function (val) { - this.custom().property3('changed'); - }); - - yoda.custom().property0('some'); - - setTimeout(function () { - expect(yoda.custom().property3()).equal('changed'); - done(); - }, 1); - }); - - it('can remove an event on a structure change', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - yoda.on('custom.property0', function (val) { - this.custom().property3('changed'); - }); - - yoda.off('custom.property0'); - - yoda.custom().property0('some'); - - setTimeout(function () { - expect(yoda.custom().property3()).equal(''); - done(); - }, 1); - }); - - it('can add an event on a specific property of an element of a collection', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master', - 'location': { - 'cities': [{'street': ''}] - } - }); - - yoda.on('location.cities[0].street', function (val) { - this.custom().property0('property changed'); - }); - - yoda.location().cities(0).street('a street'); - - setTimeout(function () { - expect(yoda.custom().property0()).equal('property changed'); - done(); - }, 1); - }); - - it('can add an event on a specific property of all elements of a collection', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master', - 'location': { - 'cities': [{'street': ''}] - } - }); - - yoda.on('location.cities.street', function (val) { - this.custom().property0('property changed again'); - }); - - yoda.location().cities(0).street('a street'); - - setTimeout(function () { - expect(yoda.custom().property0()).equal('property changed again'); - done(); - }, 1); - }); - - it('can navigate through relationships bewteen components', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - anakin.children().push(luke); - - const leia = new Person({ - 'firstName': 'Leia Amidala', - 'lastName': 'Skywalker' - }); - - leia.father(anakin); - - expect(leia.father().children(0).firstName()).equal('Luke'); - }); - - it('can get a property', function () { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - expect(yoda.firstName()).equal('Yoda'); - }); - - it('can set a property', function () { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - yoda.lastName('Grand Jedi Master'); - - expect(yoda.lastName()).equal('Grand Jedi Master'); - }); - - it('can not set an invalid value', function () { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - yoda.lastName(42); - - expect(yoda.lastName()).equal('Master'); - }); - - it('can set a date', function () { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - const now = new Date(); - yoda.birthDate(now); - - expect(yoda.birthDate().toISOString()).equal(now.toISOString()); - }); - - it('can add a link to another component', function () { - const Person = runtime.require('Person'); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - const leia = new Person({ - 'firstName': 'Leia Amidala', - 'lastName': 'Skywalker' - }); - - leia.father(anakin); - - expect(leia.father().firstName()).equal('Anakin'); - }); - - it('can add a link to another component that inherits from the valid class', function () { - const Person = runtime.require('Person'); - const Teacher = runtime.require('Teacher'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const yoda = new Teacher({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - luke.teacher(yoda); - - expect(luke.teacher()).to.not.be.undefined; - }); - - it('can remove a link to another component', function () { - const Person = runtime.require('Person'); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - const leia = new Person({ - 'firstName': 'Leia Amidala', - 'lastName': 'Skywalker' - }); - - leia.father(anakin); - leia.father(null); - - expect(leia.father()).equal(undefined); - }); - - it('can add an item in a collection in the config', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker', - 'children': [luke] - }); - - expect(anakin.children(0).id()).equal(luke.id()); - }); - - it('can add an item in a collection with api', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - anakin.children(0, luke); - - expect(anakin.children(0).id()).equal(luke.id()); - }); - - it('can add items in a collection with api', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - anakin.children([luke, anakin]); - - expect(anakin.children().length).equal(2); - }); - - it('can remove an item of a collection with pop', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker', - 'children': [luke] - }); - - expect(anakin.children().pop().id()).equal(luke.id()); - }); - - it('can remove an item of an array property with pop', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker', - 'likes': ['saying noooooo!'] - }); - - luke.likes().pop(); - - expect(luke.likes().length).equal(0); - }); - - it('can add an item of a collection with push', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - anakin.children().push(luke); - - expect(anakin.children(0).id()).equal(luke.id()); - }); - - it('can add an item of an array property with push', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - luke.likes().push('saying nooooooo!'); - - expect(luke.likes().length).equal(1); - }); - - it('can clear a collection with api', function () { - const Person = runtime.require('Person'); - - const luke = new Person({ - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - anakin.children([luke, anakin]); - anakin.children([]); - - expect(anakin.children().length).equal(0); - }); const Teacher = runtime.require('Teacher'); - - it('can add an item in a collection that inherits from the valid class', function () { - const Person = runtime.require('Person'); - const Teacher = runtime.require('Teacher'); - - const vador = new Person({ - 'firstName': 'Darth', - 'lastName': 'Vader' - }); - - const luke = new Teacher({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - - vador.children(0, luke); - - expect(vador.children(0)).to.not.be.undefined; - }); - - it('can destroy itself', function () { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master' - }); - const id = yoda.id(); - yoda.destroy(); - - expect(runtime.require(id)).equal(undefined); - }); - - it('can destroy a class', function () { - const Person = runtime.require('Person'); - Person.destroy(); - - const result = runtime.require('Person'); - expect(result).equal(undefined); - }); - - it('can create a core object', function () { - const Person = runtime.require('Person'); - const shadow = new Person({ - 'firstName': 'Shadow', - 'lastName': 'Object', - '_core': true - }); - - expect(runtime.bundle().indexOf('Shadow')).equal(-1); - }); - - it('can call a parent method', function () { - const Person = runtime.require('Person'); - const Teacher = runtime.require('Teacher'); - - Person.on('fullName', () => { - return this.firstName() + ' ' + this.lastName(); - }); - - Teacher.on('fullName', () => { - return 'Great Teacher ' + this.require('Person').fullName(this); - }); - - const eikichi = new Teacher({ - 'firstName': 'Eikichi', - 'lastName': 'Onizuka' - }); - - expect(eikichi.fullName()).equal('Great Teacher Eikichi Onizuka'); - }); - - it('can send an error catched by the runtime', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - '_id': 'yoda', - 'firstName': 'Yoda', - 'lastName': 'Master', - 'likes': ['teaching'] - }); - - runtime.on('error', function (data) { - this.require('yoda').lastName('error'); - }); - - yoda.on('testMethod', function () { - ANonDefinedFunction(); - }); - yoda.testMethod(); - - setTimeout(function () { - expect(yoda.lastName()).equal('error'); - done(); - }, 1); - }); - - it('can send an error catched by a component', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - 'firstName': 'Yoda', - 'lastName': 'Master', - 'likes': ['teaching'] - }); - - yoda.on('error', function (data) { - this.lastName('error'); - }); - - yoda.on('testMethod', function () { - ANonDefinedFunction(); - }); - yoda.testMethod(); - - setTimeout(function () { - expect(yoda.lastName()).equal('error'); - done(); - }, 1); - }); - - it('can send an error catched by the system', function (done) { - const Person = runtime.require('Person'); - const yoda = new Person({ - '_id': 'yoda1', - 'firstName': 'Yoda', - 'lastName': 'Master', - 'likes': ['teaching'] - }); - - runtime.system().on('error', function (data) { - this.require('yoda1').lastName('error'); - }); - - yoda.on('testMethod', function () { - ANonDefinedFunction(); - }); - yoda.testMethod(); - - setTimeout(function () { - expect(yoda.lastName()).equal('error'); - done(); - }, 1); - }); -}); diff --git a/test/runtime/database-spec.js b/test/runtime/database-spec.js deleted file mode 100644 index 17a745a..0000000 --- a/test/runtime/database-spec.js +++ /dev/null @@ -1,14 +0,0 @@ -describe('System Runtime db component', () => { - - // init - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - - it('exists', () => { - const db = runtime.require('db'); - - expect(db).to.not.be.undefined; - }); -}); diff --git a/test/runtime/history-spec.js b/test/runtime/history-spec.js deleted file mode 100644 index 14fb2e4..0000000 --- a/test/runtime/history-spec.js +++ /dev/null @@ -1,182 +0,0 @@ -describe('System Runtime history component', () => { - - // init - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - - beforeEach(() => { - const history = runtime.require('history'); - history.start(); - }); - - afterEach(() => { - const history = runtime.require('history'); - history.stop(); - }); - - it('exists', () => { - const history = runtime.require('history'); - - expect(history).to.not.be.undefined; - }); - - it('can go back', () => { - const metamodel = runtime.require('metamodel'); - metamodel.schema({ - '_name': 'PersonHistoryTest1', - '_inherit': ['_Component'], - 'firstName': 'property' - }); - - metamodel.model({ - '_name': 'PersonHistoryTest1', - '_inherit': ['_Component'], - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - } - }); - - metamodel.create(); - - expect(metamodel.require('PersonHistoryTest1')).to.not.be.undefined; - - const Person = runtime.require('PersonHistoryTest1'); - - // insert - new Person({ - 'firstName': 'Yoda' - }); - - expect(runtime.require('db').collections().PersonHistoryTest1.find().length).equal(1); - - const history = runtime.require('history'); - - history.from(-1); - history.back(); - - expect(runtime.require('db').collections().PersonHistoryTest1.find().length).equal(0); - - // update - const yoda = new Person({ - 'firstName': 'Yoda' - }); - - expect(runtime.require('db').collections().PersonHistoryTest1.find().length).equal(1); - - yoda.firstName('none'); - - history.from(-1); - history.back(); - - expect(yoda.firstName()).equal('Yoda'); - - // remove - yoda.destroy(); - - history.from(-1); - history.back(); - - expect(runtime.require('db').collections().PersonHistoryTest1.find().length).equal(1); - }); - - it('can go forward', () => { - const metamodel = runtime.require('metamodel'); - metamodel.schema({ - '_name': 'PersonHistoryTest2', - '_inherit': ['_Component'], - 'firstName': 'property' - }); - - metamodel.model({ - '_name': 'PersonHistoryTest2', - '_inherit': ['_Component'], - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - } - }); - - metamodel.create(); - - expect(metamodel.require('PersonHistoryTest2')).to.not.be.undefined; - - const Person = runtime.require('PersonHistoryTest2'); - - // remove - const yoda = new Person({ - 'firstName': 'Yoda' - }); - yoda.destroy(); - - expect(runtime.require('db').collections().PersonHistoryTest2.find().length).equal(0); - - const history = runtime.require('history'); - - history.from(-1); - history.back(); - - expect(runtime.require('db').collections().PersonHistoryTest2.find().length).equal(1); - - history.forward(); - - expect(runtime.require('db').collections().PersonHistoryTest2.find().length).equal(0); - - // update - const yoda1 = new Person({ - 'firstName': 'Yoda' - }); - yoda1.firstName('none'); - - history.from(-1); - history.back(); - - expect(yoda1.firstName()).equal('Yoda'); - - history.forward(); - - expect(yoda1.firstName()).equal('none'); - - // insert - new Person({ - 'firstName': 'Yoda' - }); - - expect(runtime.require('db').collections().PersonHistoryTest2.find().length).equal(2); - - history.from(-1); - history.back(); - - expect(runtime.require('db').collections().PersonHistoryTest2.find().length).equal(1); - - history.forward(); - - expect(runtime.require('db').collections().PersonHistoryTest2.find().length).equal(2); - }); - - it('can get an item of the history', () => { - const history = runtime.require('history'); - const item = history.get(0); - - expect(item.action).to.not.be.undefined; - }); - - it('can dump all the history', () => { - const history = runtime.require('history'); - - expect(history.dump()).to.not.be.undefined; - }); - - it('can load a dump of an history', () => { - const history = runtime.require('history'); - const dump = history.dump(); - - expect(history.load(dump)).equal(true); - }); -}); diff --git a/test/runtime/metamodel-spec.js b/test/runtime/metamodel-spec.js deleted file mode 100644 index 9095b4b..0000000 --- a/test/runtime/metamodel-spec.js +++ /dev/null @@ -1,602 +0,0 @@ -describe('System Runtime metamodel component', () => { - - // init - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - - it('exists', () => { - const metamodel = runtime.require('metamodel'); - - expect(metamodel).to.not.be.undefined; - }); - - it('can add a schema', () => { - const metamodel = runtime.require('metamodel'); - metamodel.schema({ - '_name': 'PersonTest', - '_inherit': ['_Component'], - 'firstName': 'property' - }); - - metamodel.model({ - '_name': 'PersonTest', - '_inherit': ['_Component'], - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - } - }); - - metamodel.create(); - - expect(metamodel.require('PersonTest')).to.not.be.undefined; - }); - - it('can update a generated model (simple mode)', () => { - const metamodel = runtime.require('metamodel'); - metamodel.schema('PersonTestSimple', { - 'firstName': 'property' - }); - - metamodel.model('PersonTestSimple', { - 'firstName': 'string' - }); - - metamodel.create(); - - expect(metamodel.require('PersonTestSimple')).to.not.be.undefined; - }); - - it('can update a method signature (simple mode)', () => { - const metamodel = runtime.require('metamodel'); - metamodel.schema('MethodTest', { - 'add': 'method' - }); - - metamodel.model('MethodTest', { - 'add': { - 'p1': 'number', - 'p2': 'number', - '=>': 'number' - } - }); - - metamodel.create(); - - var MethodTest = runtime.require('MethodTest'); - - MethodTest.on('add', (p1, p2) => { - return p1 + p2; - }); - - var test = new MethodTest(); - - expect(test.add(1, 2)).equal(3); - }); - - it('can add a type', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.type({ - 'name': 'address', - 'type': 'object', - 'schema': { - 'planet': { 'type': 'string', 'mandatory': true } - } - }); - - metamodel.type({ - 'name': 'sex', - 'type': 'string', - 'value': ['male', 'female'] - }); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'sex': 'property', - 'firstName': 'property', - 'lastName': 'property', - 'address': 'property' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'sex': { - 'type': 'sex', - 'readOnly': true, - 'mandatory': true, - 'default': 'male' - }, - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': true, - 'mandatory': true, - 'default': '' - }, - 'address': { - 'type': 'address', - 'readOnly': true, - 'mandatory': false, - 'default': { - planet: '' - } - } - }); - - metamodel.create(); - - const Person = runtime.require('Person'); - - const yoda = new Person({ - 'sex': 'male', - 'firstName': 'Yoda', - 'lastName': 'Master', - 'address': { - 'planet': 'Dagobah' - } - }); - - expect(yoda.address().planet()).equal('Dagobah'); - }); - - it('can add a type (simple mode)', () => { - const metamodel = runtime.require('metamodel'); - metamodel.schema('PersonTestSimple2', { - 'firstName': 'property', - 'address': 'property' - }); - - metamodel.model('PersonTestSimple2', { - 'firstName': 'string', - 'address': 'address2' - }); - - metamodel.type('address2', { - 'address': 'string', - 'city': 'city' - }); - - metamodel.type('city', - ['Paris', 'Rennes'] - ); - - metamodel.create(); - - var PersonTestSimple2 = runtime.require('PersonTestSimple2'); - - var person = new PersonTestSimple2({ - 'firstName': 'a name', - 'address': { - 'address': 'an address', - 'city': 'Paris' - } - }); - - expect(person.address().city()).equal('Paris'); - }); - - it('can create a collection of structure', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.type({ - 'name': 'vegetable', - 'type': 'object', - 'schema': { - 'kind': { 'type': ['string'], 'mandatory': true } - } - }); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'firstName': 'property', - 'lastName': 'property', - 'eats': 'collection' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': true, - 'mandatory': true, - 'default': '' - }, - 'eats': { - 'type': ['vegetable'], - 'readOnly': true, - 'mandatory': false, - 'default': [] - } - }); - - metamodel.create(); - - const Person = runtime.require('Person'); - - const yoda = new Person({ - 'sex': 'male', - 'firstName': 'Yoda', - 'lastName': 'Master', - 'eats': [{ - 'kind': ['all'] - }] - }); - - expect(yoda.eats(0).kind(0)).equal('all'); - }); - - it('can create a complex structure', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.type({ - 'name': 'foods', - 'type': 'object', - 'schema': { - 'vegetables': { 'type': 'vegetable', 'mandatory': true } - } - }); - - metamodel.type({ - 'name': 'vegetable', - 'type': 'object', - 'schema': { - 'kind': { 'type': ['string'], 'mandatory': true } - } - }); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'firstName': 'property', - 'lastName': 'property', - 'likes': 'property' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': true, - 'mandatory': true, - 'default': '' - }, - 'likes': { - 'type': 'foods', - 'readOnly': true, - 'mandatory': false, - 'default': { - } - } - }); - - metamodel.create(); - - const Person = runtime.require('Person'); - - const yoda = new Person({ - 'sex': 'male', - 'firstName': 'Yoda', - 'lastName': 'Master', - 'likes': { - 'vegetables': { - 'kind': ['all'] - } - } - }); - - expect(yoda.likes().vegetables().kind(0)).equal('all'); - }); - - it('can create a one to one relationship', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'sex': 'property', - 'firstName': 'property', - 'lastName': 'property', - 'address': 'property', - 'father': 'link' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'sex': { - 'type': 'sex', - 'readOnly': true, - 'mandatory': true, - 'default': 'male' - }, - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': true, - 'mandatory': true, - 'default': '' - }, - 'address': { - 'type': 'address', - 'readOnly': true, - 'mandatory': false, - 'default': { - planet: '' - } - }, - 'father': { - 'type': 'Person', - 'readOnly': false, - 'mandatory': false, - 'default': {} - } - }); - - metamodel.create(); - - const Person = runtime.require('Person'); - - const anakin = new Person({ - 'sex': 'male', - 'firstName': 'Anakin', - 'lastName': 'Skywalker' - }); - - const luke = new Person({ - 'sex': 'male', - 'firstName': 'Luke', - 'lastName': 'Skywalkers', - 'father': anakin - }); - - expect(luke.father().firstName()).equal('Anakin'); - }); - - - it('can create a one to many relationship', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'children': 'collection', - 'sex': 'property', - 'firstName': 'property', - 'lastName': 'property', - 'address': 'property', - 'father': 'link' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'sex': { - 'type': 'sex', - 'readOnly': true, - 'mandatory': true, - 'default': 'male' - }, - 'children': { - 'type': ['Person'], - 'readOnly': true, - 'mandatory': false, - 'default': [] - }, - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': true, - 'mandatory': true, - 'default': '' - }, - 'address': { - 'type': 'address', - 'readOnly': true, - 'mandatory': false, - 'default': { - planet: '' - } - }, - 'father': { - 'type': 'Person', - 'readOnly': false, - 'mandatory': false, - 'default': {} - } - }); - - metamodel.create(); - - const Person = runtime.require('Person'); - - const leia = new Person({ - 'sex': 'female', - 'firstName': 'Leia Amidala', - 'lastName': 'Skywalker' - }); - - const luke = new Person({ - 'sex': 'male', - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const padme = new Person({ - 'sex': 'female', - 'firstName': 'Padme', - 'lastName': 'Amidala', - 'children': [luke, leia] - }); - - expect(padme.children(1).firstName()).equal('Leia Amidala'); - }); - - - it('can generate APIs to navigate through the model', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.schema({ - '_name': 'Person', - '_inherit': ['_Component'], - 'children': 'collection', - 'sex': 'property', - 'firstName': 'property', - 'lastName': 'property', - 'address': 'property', - 'father': 'link', - 'son': 'property' - }); - - metamodel.model({ - '_name': 'Person', - '_inherit': ['_Component'], - 'sex': { - 'type': 'sex', - 'readOnly': true, - 'mandatory': true, - 'default': 'male' - }, - 'children': { - 'type': ['Person'], - 'readOnly': true, - 'mandatory': false, - 'default': [] - }, - 'firstName': { - 'type': 'string', - 'readOnly': false, - 'mandatory': true, - 'default': '' - }, - 'lastName': { - 'type': 'string', - 'readOnly': true, - 'mandatory': true, - 'default': '' - }, - 'father': { - 'type': 'Person', - 'readOnly': false, - 'mandatory': false, - 'default': {} - }, - 'address': { - 'type': 'address', - 'readOnly': true, - 'mandatory': false, - 'default': { - planet: '' - } - }, - 'son': { - 'type': 'Person', - 'readOnly': false, - 'mandatory': false, - 'default': {} - } - }); - - metamodel.create(); - - const Person = runtime.require('Person'); - - const luke = new Person({ - 'sex': 'male', - 'firstName': 'Luke', - 'lastName': 'Skywalker' - }); - - const anakin = new Person({ - 'sex': 'male', - 'firstName': 'Anakin', - 'lastName': 'Skywalker', - 'son': luke - }); - - const leia = new Person({ - 'sex': 'female', - 'firstName': 'Leia Amidala', - 'lastName': 'Skywalker', - 'father': anakin - }); - - expect(leia.father().son().firstName()).equal('Luke'); - }); - - it('can add a type (simple mode)', () => { - const metamodel = runtime.require('metamodel'); - - // create the schema - metamodel.schema('PersonSimple', { - 'firstName': 'property', - 'lastName': 'property', - 'age': 'property', - 'father': 'link', - 'mother': 'link', - 'children': 'collection', - 'fullName': 'method' - }); - - // override the generated model - metamodel.model('PersonSimple', { - 'firstName': 'string', - 'lastName': 'string', - 'age': 'number', - 'father': 'Person', - 'mother': 'Person', - 'children': ['Person'], - 'fullName': { - '=>': 'string' - } - }); - - // create the model and related class - metamodel.create(); - - const PersonSimple = runtime.require('PersonSimple'); - const person = new PersonSimple({ - firstName: 'a first name', - mother: '', - children: [] - }); - - expect(person.fullName()).equal(undefined); - }); -}); diff --git a/test/runtime/mson-spec.js b/test/runtime/mson-spec.js deleted file mode 100644 index 4e702d3..0000000 --- a/test/runtime/mson-spec.js +++ /dev/null @@ -1,120 +0,0 @@ -describe('a MSON schema', () => { - - // init - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - - it('can make inheritance at schema level', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.schema({ - '_name': 'Person_test', - '_inherit': ['_Component'], - 'firstName': 'property', - 'lastName': 'property', - 'getFullName': 'method' - }); - - metamodel.schema({ - '_name': 'Teacher_test', - '_inherit': ['Person_test'] - }); - - metamodel.create(); - - const Person = runtime.require('Person_test'); - - Person.off('getFullName'); - - Person.on('getFullName', () => this.firstName() + ' ' + this.lastName()); - - const Teacher = runtime.require('Teacher_test'); - - const eikichi = new Teacher({ - 'firstName': 'Eikichi', - 'lastName': 'Onizuka' - }); - - expect(eikichi.getFullName()).equal('Eikichi Onizuka'); - }); - - it('implements C3 superclass linearization algorithm', () => { - const metamodel = runtime.require('metamodel'); - - metamodel.schema({ - '_name': 'TestResult', - 'getParent': 'method' - }); - - metamodel.model({ - '_name': 'TestResult', - 'getParent': { - 'params': [], - 'result': 'array' - } - }); - - metamodel.schema({ - '_name': 'O', - '_inherit': [] - }); - - metamodel.schema({ - '_name': 'A', - '_inherit': ['O'] - }); - - metamodel.schema({ - '_name': 'B', - '_inherit': ['O'] - }); - - metamodel.schema({ - '_name': 'C', - '_inherit': ['O'] - }); - - metamodel.schema({ - '_name': 'D', - '_inherit': ['O'] - }); - - metamodel.schema({ - '_name': 'E', - '_inherit': ['O'] - }); - - metamodel.schema({ - '_name': 'K1', - '_inherit': ['A', 'B', 'C'] - }); - - metamodel.schema({ - '_name': 'K2', - '_inherit': ['D', 'B', 'E'] - }); - - metamodel.schema({ - '_name': 'K3', - '_inherit': ['D', 'A'] - }); - - metamodel.schema({ - '_name': 'Z', - '_inherit': ['K1', 'K2', 'K3'] - }); - - metamodel.create(); - - const TestResult = runtime.require('TestResult'); - TestResult.on('getParent', () => { - return $metamodel.getParents('Z'); - }, true); - - const test = new TestResult(); - - expect(test.getParent().join('_')).equal(['K1', 'K2', 'K3', 'D', 'A', 'B', 'C', 'E', 'O'].join('_')); - }); -}); diff --git a/test/runtime/runtime-spec.js b/test/runtime/runtime-spec.js deleted file mode 100644 index f32d6b2..0000000 --- a/test/runtime/runtime-spec.js +++ /dev/null @@ -1,108 +0,0 @@ -describe('System Runtime runtime component', () => { - - // init - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - - it('exists', () => { - expect(runtime).to.not.be.undefined; - }); - - it('can get its version', () => { - const version = runtime.version(); - - expect(typeof version).equal('string'); - }); - - it('can create a system', () => { - const id = runtime.system('a system'); - - expect(id).to.not.be.undefined; - }); - - it('can bundle a system', () => { - const bundle = runtime.bundle(); - - expect(bundle).to.not.be.undefined; - }); - - it('can get the status of all installed bundles', () => { - const status = runtime.status(); - - expect(status).to.not.be.undefined; - }); - - it('can install a bundle', () => { - const systemId = runtime.install({ - "name": "Test", - "master": true, - "version": "0.0.1", - "description": "", - "schemas": { - "k141cc1821c1b775": { - "_id": "k141cc1821c1b775", - "_name": "TestSchema", - "_inherit": [ - "_Component" - ] - } - }, - "models": { - "b19c171575f1824b": { - "_id": "b19c171575f1824b", - "_name": "TestSchema", - "_description": "" - } - }, - "behaviors": { - "n1e72b1ed051cf36": { - "_id": "n1e72b1ed051cf36", - "component": "k16d101760d1ec2a", - "state": "start", - "action": "function start() { \n \n}", - "useCoreAPI": false, - "core": false - } - }, - "types": { - "TestType": { - "_id": "o1cf651e05613735", - "name": "TestType", - "description": "", - "type": "object", - "schema": { - "property1": { - "type": "any", - "mandatory": false, - "default": "" - }, - "property2": { - "type": "any", - "mandatory": false, - "default": "" - } - } - } - }, - "components": { - "TestSchema": { - "z1f91a1beb01f48f": { - "_id": "z1f91a1beb01f48f" - } - } - }, - "_id": "k16d101760d1ec2a" - }); - - expect(systemId).equal('k16d101760d1ec2a'); - }); - - it('can uninstall a bundle', () => { - runtime.uninstall('k16d101760d1ec2a'); - const state = runtime.require('k16d101760d1ec2a').state(); - - expect(state).equal('uninstalled'); - }); -}); diff --git a/test/runtime/system-spec.js b/test/runtime/system-spec.js deleted file mode 100644 index e054799..0000000 --- a/test/runtime/system-spec.js +++ /dev/null @@ -1,51 +0,0 @@ -describe('a system', () => { - - let system = null; - - // init - beforeEach(() => { - if (typeof window === 'undefined') { - runtime = require('../../src/runtime.js'); - expect = require('chai').expect; - } - system = runtime.system('test5'); - }); - - it('has a name', () => { - expect(system.name()).equal('test5'); - }); - - it('has a description', () => { - expect(typeof system.description()).equal('string'); - }); - - it('has a version', () => { - expect(system.version()).to.not.be.undefined; - }); - - it('has schemas', () => { - expect(system.schemas()).to.not.be.undefined; - }); - - it('has models', () => { - expect(system.models()).to.not.be.undefined; - }); - - it('has behaviors', () => { - expect(system.behaviors()).to.not.be.undefined; - }); - - it('has types', () => { - expect(system.types()).to.not.be.undefined; - }); - - it('has components', () => { - expect(system.components()).to.not.be.undefined; - }); - - it('can get its location', () => { - const location = system.location(); - - expect(location).to.not.be.undefined; - }); -}); diff --git a/test/system-spec.js b/test/system-spec.js new file mode 100644 index 0000000..0b67649 --- /dev/null +++ b/test/system-spec.js @@ -0,0 +1,49 @@ +import runtime from '../src/runtime.js' +import { expect } from 'chai' + +describe('a system', function () { + let system = null + + // init + beforeEach(function () { + system = runtime.system('test5') + }) + + it('has a name', function () { + expect(system.name()).equal('test5') + }) + + it('has a description', function () { + expect(typeof system.description()).equal('string') + }) + + it('has a version', function () { + expect(system.version()).to.not.be.undefined + }) + + it('has schemas', function () { + expect(system.schemas()).to.not.be.undefined + }) + + it('has models', function () { + expect(system.models()).to.not.be.undefined + }) + + it('has behaviors', function () { + expect(system.behaviors()).to.not.be.undefined + }) + + it('has types', function () { + expect(system.types()).to.not.be.undefined + }) + + it('has components', function () { + expect(system.components()).to.not.be.undefined + }) + + it('can get its location', function () { + const location = system.location() + + expect(location).to.not.be.undefined + }) +}) From c7817d3f9d55f455ac825e0fd4fb63d1607d3af0 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Mon, 31 Oct 2022 18:17:29 +0100 Subject: [PATCH 03/12] chore: update .npmignore --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index 4bde5d2..abc92f0 100644 --- a/.npmignore +++ b/.npmignore @@ -3,6 +3,7 @@ /.vscode/ /build/ /cypress/ +/example/ /src/banners/ /src/system/ /tasks/ From ae8679059eaf75e0eb68fbad6c3b0884d7eaa66b Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 11:45:59 +0100 Subject: [PATCH 04/12] chore: clean systems --- dist/system-runtime.js | 2 +- dist/system-runtime.js.map | 2 +- extensions/mode-admin-server.json | 456 +------------------------ extensions/mode-admin.json | 551 +----------------------------- extensions/mode-dev.json | 22 +- extensions/storage.json | 103 +----- src/system.js | 2 +- src/system/system-runtime.json | 2 +- 8 files changed, 8 insertions(+), 1132 deletions(-) diff --git a/dist/system-runtime.js b/dist/system-runtime.js index 6c8d849..5660afc 100644 --- a/dist/system-runtime.js +++ b/dist/system-runtime.js @@ -17,5 +17,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=T(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var q={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let F={};var V={set:function(e,t,n){F[e]={state:t,value:n}},get:function(e){return F[e]},clear:function(){F={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function Q(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=q.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=q.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?q.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],q.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"5.1.0\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"5.1.0\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\\n if (url.indexOf('.json') !== -1) {\\n if (typeof global.process.env.PWD === 'undefined') {\\n system = require(global.process.cwd() + '/' + url);\\n } else {\\n system = require(global.process.env.PWD + '/' + url);\\n }\\n } else {\\n system = require(url);\\n }\\n systemId = $db.importSystem(system);\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"5.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,CAAC,WAAY,aAAc,OAAQ,SAAU,SAiHlEC,cA/GoB,CACpB,UACA,SACA,SACA,SACA,WACA,QACA,OACA,OAwGAC,kBArGwB,CACxBC,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,CACLF,KAAM,SACNC,WAAW,GAEbE,SAAU,CACRH,KAAM,CAAC,UACPC,WAAW,EACXG,QAAS,CAAC,eAEZC,OAAQ,CACNL,KAAM,UACNC,WAAW,GAEbK,MAAO,CACLN,KAAM,UACNC,WAAW,GAEbM,aAAc,CACZP,KAAM,SACNC,WAAW,IA8EbO,iBA1EuB,CACvBT,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,CACLF,KAAM,SACNC,WAAW,GAEbE,SAAU,CACRH,KAAM,CAAC,UACPC,WAAW,GAEbI,OAAQ,CACNL,KAAM,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SACRC,WAAa,IAGfY,MAAQ,GAETgC,SAAY,CACX9C,IAAO,mBACPW,KAAQ,WACRV,KAAQ,SACRW,OAAU,CACTX,KAAQ,CACPA,KAAQ,SACRC,WAAa,GAEdsL,SAAY,CACXvL,KAAQ,UACRC,WAAa,GAEdA,UAAa,CACZD,KAAQ,UACRC,WAAa,GAEdG,QAAW,CACVJ,KAAQ,SACRC,WAAa,GAEda,YAAe,CACdd,KAAQ,SACRC,WAAa,GAEduL,MAAS,CACRxL,KAAQ,SACRC,WAAa,IAGfY,MAAQ,GAET+gB,KAAQ,CACP7hB,IAAO,mBACPW,KAAQ,OACRV,KAAQ,SACRa,MAAQ,GAETghB,UAAa,CACZ9hB,IAAO,mBACPW,KAAQ,YACRV,KAAQ,SACRW,OAAU,CACTW,QAAW,CACVtB,KAAQ,SACRC,WAAa,GAEd6V,MAAS,CACR9V,KAAQ,SACRC,WAAa,IAGfY,MAAQ,IAGVke,WAAc,CACbS,SAAY,CACXY,QAAW,CACVrgB,IAAO,YAGT+hB,UAAa,CACZC,GAAM,CACLhiB,IAAO,OAGTqC,QAAW,CACV4f,OAAU,CACTjiB,IAAO,SACPmB,MAAS,SAGX+gB,WAAc,CACbC,UAAa,CACZniB,IAAO,cAGT6I,SAAY,CACXuZ,QAAW,CACVpiB,IAAO,UACP2e,QAAW,UAGb0D,SAAY,CACXC,QAAW,CACVtiB,IAAO,aAIVA,IAAO,oBDh0CRiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file +{"version":3,"file":"system-runtime.js","sources":["../src/mson.js","../src/log.js","../src/helper.js","../src/metamodel.js","../src/behavior.js","../src/state.js","../src/history.js","../src/workflow.js","../src/component.js","../src/db.js","../src/runtime.js","../src/system.js"],"sourcesContent":["/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module mson\n * @description This module contains all the mson definition.\n */\n\nconst ID = '_id'\nconst NAME = '_name'\nconst DESCRIPTION = '_description'\nconst INHERIT = '_inherit'\nconst CLASS = '_class'\nconst CORE = '_core'\n\nconst INTERNAL_NAMES = [\n '_id',\n '_name',\n '_inherit',\n '_description',\n '_class',\n '_core',\n]\n\nconst PROPERTY_TYPE = 'property'\nconst COLLECTION_TYPE = 'collection'\nconst LINK_TYPE = 'link'\nconst METHOD_TYPE = 'method'\nconst EVENT_TYPE = 'event'\n\nconst INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']\n\nconst DEFAULT_TYPES = [\n 'boolean',\n 'string',\n 'number',\n 'object',\n 'function',\n 'array',\n 'date',\n 'any',\n]\n\nconst SCHEMA_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n default: ['_Component'],\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst MODEL_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst TYPE_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n name: {\n type: 'string',\n mandatory: true,\n },\n type: {\n type: 'string',\n mandatory: true,\n },\n schema: {\n type: 'object',\n mandatory: false,\n },\n value: {\n type: ['any'],\n mandatory: false,\n },\n core: {\n type: 'boolean',\n mandatory: false,\n },\n description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nexport default {\n ID,\n NAME,\n DESCRIPTION,\n INHERIT,\n CLASS,\n CORE,\n INTERNAL_NAMES,\n PROPERTY_TYPE,\n COLLECTION_TYPE,\n LINK_TYPE,\n METHOD_TYPE,\n EVENT_TYPE,\n INTERNAL_TYPES,\n DEFAULT_TYPES,\n SCHEMA_DEFINITION,\n MODEL_DEFINITION,\n TYPE_DEFINITION,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module log\n * @requires metamodel\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions that write a log\n */\n\nimport $metamodel from './metamodel.js'\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet currentLevel = 'warn' // eslint-disable-line no-unused-vars\nlet loggerRef = null\nlet fakeLoggerRef = {\n currentLevel: 'warn',\n level: function debug(levelName) {\n if (levelName) {\n this.currentLevel = levelName\n }\n return this.currentLevel\n },\n debug: function debug(message) {\n if (this.currentLevel === 'debug') {\n console.log('runtime: ' + message)\n }\n },\n info: function info(message) {\n if (this.currentLevel === 'info' || this.currentLevel === 'debug') {\n console.info('runtime: ' + message)\n }\n },\n warn: function warning(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug'\n ) {\n console.warn('runtime: ' + message)\n }\n },\n error: function error(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug' ||\n this.currentLevel === 'error'\n ) {\n console.error('runtime: ' + message)\n }\n },\n}\n\n/**\n * @method getLogger\n * @return {_Logger} _Logger instance\n * @private\n * @description Get the _Logger instance\n */\nfunction getLogger() {\n let loggerId = ''\n let loggers = []\n let result = null\n\n if (!$metamodel.getModel('_Logger')) {\n result = fakeLoggerRef\n } else {\n loggers = $db.collections._Logger.find()\n if (loggers.length) {\n loggerId = loggers[0][$mson.ID]\n\n if ($component.get(loggerId)) {\n loggerRef = $component.get(loggerId)\n result = loggerRef\n } else {\n result = fakeLoggerRef\n }\n } else {\n result = fakeLoggerRef\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method level\n * @param {String} levelName name of the level\n * @description Set the level of the log\n */\nfunction level(levelName) {\n currentLevel = levelName\n}\n\n/**\n * @method unknownProperty\n * @param {String} propertyName the name of the property\n * @param {Object} schema the schema definition\n * @description A property of a schema is unknown\n */\nfunction unknownProperty(propertyName, schema) {\n let message = ''\n\n if (schema[$mson.NAME]) {\n message =\n \"unknown property '\" +\n propertyName +\n \"' for the definition of '\" +\n schema[$mson.NAME] +\n \"'\"\n } else {\n message = \"unknown property '\" + propertyName + \"' for a model\"\n }\n\n getLogger().warn(message)\n}\n\n/**\n * @method invalidPropertyType\n * @param {String} propertyName name of the peropety\n * @param {String} type the type defined by the schema\n * @param {String} property the property\n * @description Invalid type for a property\n */\nfunction invalidPropertyType(propertyName, type, property) {\n let realType =\n property && property.constructor\n ? property.constructor.name\n : typeof property\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidEnumValue\n * @param {Object} value the value\n * @param {String} type the type defined by the schema\n * @description Invalid value for type enum\n */\nfunction invalidEnumValue(value, type) {\n getLogger().warn(\n \"'\" + value + \"' is an invalid value for the type enum '\" + type + \"'\"\n )\n}\n\n/**\n * @method invalidClassName\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidClassName(componentId, type, constructorName) {\n getLogger().warn(\n \"invalid component '\" +\n componentId +\n \"' for a collection: expected a component of class '\" +\n type +\n \"' instead of '\" +\n constructorName +\n \"'\"\n )\n}\n\n/**\n * @method missingProperty\n * @param {String} propertyName name of the property\n * @description Missing a property\n */\nfunction missingProperty(propertyName) {\n getLogger().warn(\"property '\" + propertyName + \"' is missing\")\n}\n\n/**\n * @method missingImplementation\n * @param {String} name name of the missing schema\n * @description A class definition is missing\n */\nfunction missingImplementation(name) {\n getLogger().warn(\"schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method invalidTypeImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Invalid type for a property of a class definition\n */\nfunction invalidTypeImp(property, className) {\n getLogger().error(\n \"the property '\" + property + \"' of \" + className + ' model is invalid'\n )\n}\n\n/**\n * @method missingPropertyImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Missing a property for a class definition\n */\nfunction missingPropertyImp(property, className) {\n getLogger().warn(\n \"missing property '\" + property + \"' in the model '\" + className + \"'\"\n )\n}\n\n/**\n * @method unknownPropertyImp\n * @param {String} property a property\n * @param {Object} schema a schema\n * @description Unkown property for a class definition\n */\nfunction unknownPropertyImp(property, schema) {\n getLogger().error(\n \"the model '\" + schema + \"' has an unknown property '\" + property + \"'\"\n )\n}\n\n/**\n * @method invalidTypeDefinition\n * @param {String} name a type definition\n * @description Try to add an invalid type\n */\nfunction invalidTypeDefinition(name) {\n getLogger().warn(\"the type '\" + name + \"' is not valid\")\n}\n\n/**\n * @method invalidPropertyName\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type type defined by the schema\n * @description Invalid property name\n */\nfunction invalidPropertyName(id, className, propertyName, propertyValue, type) {\n let classInfo = ''\n let realType = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n if (typeof type === 'string') {\n realType =\n propertyValue && propertyValue.constructor\n ? propertyValue.constructor.name\n : typeof propertyValue\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n realType = type && type.constructor ? type.constructor.name : typeof type\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n classInfo +\n \": expected type 'string' instead of type '\" +\n realType +\n \"'\"\n )\n }\n}\n\n/**\n * @method readOnlyProperty\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @description Trying to set a read-only property\n */\nfunction readOnlyProperty(id, className, propertyName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"can not set read-only property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidDocumentOnDbInsert\n * @param {String} doc a document\n * @param {String} collectionName the name of the collection\n * @description Invalid document on a System Runtime database insert operation\n */\nfunction invalidDocumentOnDbInsert(doc, collectionName) {\n getLogger().warn(\n \"invalid document '\" +\n JSON.stringify(doc).replace(/,/g, ', ') +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidPropertyTypeOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} id id of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type expected type defined by the schema\n * @description Invalid property on a System Runtime database update operation\n */\nfunction invalidPropertyTypeOnDbUpdate(\n collectionName,\n id,\n propertyName,\n propertyValue,\n type\n) {\n getLogger().warn(\n \"invalid type for the property '\" +\n propertyName +\n \"' of the document '\" +\n id +\n \"' (\" +\n collectionName +\n \" collection) with the value '\" +\n JSON.stringify(propertyValue) +\n \"': expected type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownPropertyOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Unkonw property on a System Runtime database update operation\n */\nfunction unknownPropertyOnDbUpdate(propertyName, collectionName, id) {\n getLogger().warn(\n \"unknown property '\" +\n propertyName +\n \"' for document '\" +\n id +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method unknownMethod\n * @param {String} classId id of the class\n * @param {String} methodName name of the method\n * @description Call an unknown method of a class\n */\nfunction unknownMethod(classId, methodName) {\n getLogger().warn(\n \"try to call an unknown action '\" +\n methodName +\n \"' for the class '\" +\n classId +\n \"'\"\n )\n}\n\n/**\n * @method invalidCollectionName\n * @param {String} name name of the collection\n * @description Try to create an invalid DatabaseCollection\n */\nfunction invalidCollectionName(name) {\n getLogger().warn(\n \"invalid name for the collection '\" +\n name +\n \"': there is no schema '\" +\n name +\n \"'\"\n )\n}\n\n/**\n * @method invalidResultType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name ot the method\n * @param {String} expectedType expected type\n * @param {String} type current type\n * @description Invalid type result of a method\n */\nfunction invalidResultType(id, className, methodName, expectedType, type) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid type for the result of action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n expectedType +\n \"' instead of type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownComponent\n * @param {String} id id of the class\n * @param {String} componentId id of the component\n * @description Unknown class\n */\nfunction unknownComponent(className, componentId) {\n getLogger().warn(\n \"unkown class name '\" + className + \"' for component '\" + componentId + \"'\"\n )\n}\n\n/**\n * @method invalidParamNumber\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a method\n */\nfunction invalidParamNumber(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid number of parameters when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidParamType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @param {String} paramName name of the parameter\n * @description Invalid type parameters for a method\n */\nfunction invalidParamType(id, className, methodName, paramName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n if (paramName !== undefined) {\n getLogger().warn(\n \"invalid type for the parameter '\" +\n paramName +\n \"' when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n } else {\n getLogger().warn(\n \"invalid type for a parameter when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n }\n}\n\n/**\n * @method behaviorNotUnique\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Add a more than one behavior to a state\n */\nfunction behaviorNotUnique(id, stateName) {\n getLogger().warn(\n \"try to add more than one action for the state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOn\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Can not add a behavior with an invalid state\n */\nfunction invalidStateOn(id, stateName) {\n getLogger().warn(\n \"try to add an action to an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOff\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description The call to a remove state of the behavior module is invalid\n */\nfunction invalidStateOff(id, stateName) {\n getLogger().warn(\n \"try to remove an action from an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method masterSystemNotFound\n * @description The master system is not found\n */\nfunction masterSystemNotFound() {\n getLogger().warn('can not export the database because no system was defined')\n}\n\n/**\n * @method invalidType\n * @param {String} name name of the type\n * @param {String} value value of the type\n * @param {String} typeName expected type defined by the schema\n * @description Invalid type\n */\nfunction invalidType(name, value, typeName) {\n let realType =\n name && value.constructor ? value.constructor.name : typeof value\n\n getLogger().warn(\n \"invalid value for property '\" +\n name +\n \"': expected type '\" +\n typeName +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidConfiguration\n * @param {Object} obj an object\n * @param {String} type expected type for the configuration\n * @description Invalid class name\n */\nfunction invalidConfiguration(obj, type) {\n getLogger().warn(\n \"invalid type for '\" + JSON.stringify(obj) + \"': expected '\" + type + \"'\"\n )\n}\n\n/**\n * @method unknownType\n * @param {String} value value\n * @description Unknown type\n */\nfunction unknownType(value) {\n getLogger().warn(\"unknown type for value '\" + JSON.stringify(value) + \"'\")\n}\n\n/**\n * @method unknownPath\n * @param {String} path path\n * @param {String} path subpath\n * @description Unknown subpath in a path\n */\nfunction unknownPath(path, subpath) {\n getLogger().warn(\n \"the path '\" + path + \"' has an unkown subpath '\" + subpath + \"'\"\n )\n}\n\n/**\n * @method canNotYetValidate\n * @param {String} id id of the component\n * @param {String} className name of the class\n * @description A component has not been alreay validated\n */\nfunction canNotYetValidate(id, className) {\n getLogger().debug(\n \"can not yet validate if the document '\" +\n id +\n \"' is compliant with \" +\n className +\n ' model'\n )\n}\n\n/**\n * @method invalidChannelEvent\n * @param {String} message message send\n * @param {String} eventName name of the event\n * @param {String} type expected type\n * @description A message send by the channel is invalid\n */\nfunction invalidChannelEvent(message, eventName, type) {\n getLogger().warn(\n \"invalid type for the message '\" +\n JSON.stringify(message) +\n \"': expected type '\" +\n type +\n \"' for event '\" +\n eventName +\n \"'\"\n )\n}\n\n/**\n * @method invalidParamNumberMethodOn\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a behavior add with 'on' method\n */\nfunction invalidParamNumberMethodOn(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"invalid number of parameters when adding an action for the state '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method updateUuid\n * @param {String} currentId id of the component\n * @param {String} newId of the component\n * @param {Boolean} alreadyUsed newId already used\n * @description Change the id of a component\n */\nfunction updateUuid(currentId, newId, alreadyUsed) {\n if (alreadyUsed) {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"' that is already used\"\n )\n } else {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"'\"\n )\n }\n}\n\n/**\n * @method invalidUseOfComponent\n * @param {String} id id of the component\n * @description Try to change the state of a component that has been destroyed\n */\nfunction invalidUseOfComponent(id) {\n getLogger().warn(\n \"try to change the state of the destroyed component '\" + id + \"'\"\n )\n}\n\n/**\n * @method invalidSchema\n * @param {String} name name of the schema\n * @description Try to add an invalid schema\n */\nfunction invalidSchema(name) {\n getLogger().warn(\n \"the schema '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidModel\n * @param {String} name name of the model\n * @description Try to add an invalid model\n */\nfunction invalidModel(name) {\n getLogger().warn(\n \"the model '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidParameters\n * @param {String} classId class name of the component\n * @param {String} document document\n * @description Invalid parameters set when creating an instance of a class\n */\nfunction invalidParameters(classId, document) {\n let id = document && document._id ? document._id : ''\n\n getLogger().warn(\n \"the parameters for creating '\" +\n id +\n \"' component (\" +\n classId +\n ' model) are not compliant with the model'\n )\n}\n\n/**\n * @method destroyedComponentCall\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Try to get the property of a destroyed component\n */\nfunction destroyedComponentCall(propertyName, id) {\n getLogger().warn(\n \"trying to get the property '\" +\n propertyName +\n \"' on the destroyed component '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidConctructorParameters\n * @param {String} object configuration\n * @param {String} name schema name\n * @description Invalid parameter type when creating an instance of a class\n */\nfunction invalidConctructorParameters(object, name) {\n getLogger().warn(\n \"the constructor parameter '\" +\n JSON.stringify(object).replace(/,/g, ', ') +\n \"' for creating a component of class '\" +\n name +\n \"' is not an object\"\n )\n}\n\n/**\n * @method unknownModel\n * @param {String} classId id of the class\n * @description Get the information of an unkown model\n */\nfunction unknownModel(classId) {\n getLogger().warn(\"the model '\" + classId + \"' does not exist\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema\n * @description A schema is missing\n */\nfunction missingSchema(name) {\n getLogger().warn(\"the schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema where the cyclic dependency was found\n * @description A cyclic dependency was found\n */\nfunction cyclicDependency(name) {\n if (name) {\n getLogger().error(\n \"a cyclic inheritance dependency with the schema '\" +\n name +\n \"’ has been found, please check the '_inherit' property of this schema\"\n )\n } else {\n getLogger().error(\n \"a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas\"\n )\n }\n}\n\n/**\n * @method invalidEnumType\n * @param {Object} value the value\n * @param {String} typeName name of the type\n * @param {String} type typeName of the type\n * @description Invalid type for a type enum\n */\nfunction invalidEnumType(value, typeName, type) {\n let realType = ''\n\n if (typeof type !== 'undefined' && type !== typeof value) {\n realType =\n value && value.constructor ? value.constructor.name : typeof value\n getLogger().warn(\n \"invalid type for the type '\" +\n typeName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n getLogger().warn(\"invalid type for the type '\" + typeName + \"'\")\n }\n}\n\n/**\n * @method loadSchema\n * @param {String} name name of the schema\n * @description Load schema\n */\nfunction loadSchema(name) {\n getLogger().debug(\"load schema '\" + name + \"'\")\n}\n\n/**\n * @method loadModel\n * @param {String} name name of the model\n * @description Load model\n */\nfunction loadModel(name) {\n getLogger().debug(\"load model '\" + name + \"'\")\n}\n\n/**\n * @method loadType\n * @param {String} name name of the type\n * @description Load type\n */\nfunction loadType(name) {\n getLogger().debug(\"load type '\" + name + \"'\")\n}\n\n/**\n * @method generatingSchema\n * @param {String} name name of the schema\n * @description Generate schema\n */\nfunction generatingSchema(name) {\n getLogger().debug('generating ' + name + ' schema ...')\n}\n\n/**\n * @method checkModel\n * @param {String} name name of the model\n * @description Check model\n */\nfunction checkModel(name) {\n getLogger().debug('analyzing ' + name + ' model...')\n}\n\n/**\n * @method createClass\n * @param {String} name name of the class\n * @description Create class\n */\nfunction createClass(name) {\n getLogger().debug(name + ' class has been created')\n}\n\n/**\n * @method initDb\n * @description Init the database\n */\nfunction initDb() {\n getLogger().debug('initializing data store...')\n}\n\n/**\n * @method actionInvokeError\n * @param {String} state state\n * @param {String} id component id\n * @param {String} className component class name\n * @param {String} message\n * @description An error happened when invoking a behavior\n */\nfunction actionInvokeError(state, id, className, message) {\n if (className !== 'Function') {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"' (\" +\n className +\n ' class): ' +\n message\n )\n } else {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"': \" +\n message\n )\n }\n}\n\n/**\n * @method invalidSchemaPropertyName\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaPropertyName(name, propName) {\n getLogger().warn(\n \"invalid name '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': a property name can not begin with '_'\"\n )\n}\n\n/**\n * @method invalidSchemaProperty\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaProperty(name, propName) {\n getLogger().warn(\n \"invalid property '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': only 'property', 'link', 'collection', 'method' and 'event' are allowed\"\n )\n}\n\n/**\n * @method invalidPropertyFormat\n * @param {String} obj definition of a property\n * @description Invalid format for the definition of a property\n */\nfunction invalidPropertyFormat(obj) {\n getLogger().warn(\n \"invalid format for a definition of a property: '\" +\n obj +\n \"' is not an object\"\n )\n}\n\n/**\n * @method invalidState\n * @param {String} model name of the model\n * @param {String} state invalid state\n * @description Invalid state\n */\nfunction invalidState(model, state) {\n getLogger().warn(\n \"invalid state '\" + state + \"' for the model '\" + model + \"'\"\n )\n}\n\n/**\n * @method unknownContext\n * @param {String} className name of the class\n * @param {String} methodName name of the method\n * @description Invoke a method class without a context\n */\nfunction unknownContext(className, methodName) {\n getLogger().warn(\n \"invoke the action '\" +\n methodName +\n \"' on the class '\" +\n className +\n \"' without a valid context\"\n )\n}\n\n/**\n * @method historyDocumentInserted\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} document\n * @description Created document from history\n */\nfunction historyDocumentInserted(id, collectionName, doc) {\n getLogger().debug(\n \"Created component of id '\" +\n id +\n \"' ('\" +\n collectionName +\n \" collection) with document '\" +\n doc +\n \"'\"\n )\n}\n\n/**\n * @method historyDocumentRemoved\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @description Removed document from history\n */\nfunction historyDocumentRemoved(id, collectionName) {\n getLogger().debug(\n \"Destroyed component of id '\" + id + \"' (\" + collectionName + ' collection)'\n )\n}\n\n/**\n * @method historyDocumentUpdated\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} fieldName field name of the component\n * @param {String} value value of the field\n * @description Updated document from history\n */\nfunction historyDocumentUpdated(id, collectionName, fieldName, value) {\n getLogger().debug(\n \"Updated field '\" +\n fieldName +\n \"' of component of id '\" +\n id +\n \"' with value '\" +\n value +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidCollectionItem\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidCollectionItem(\n id,\n className,\n propertyName,\n propertyValue,\n type\n) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' for all items of the collection '\" +\n JSON.stringify(propertyValue) +\n \"'\"\n )\n}\n\nexport default {\n level,\n unknownProperty,\n invalidPropertyType,\n invalidEnumValue,\n invalidClassName,\n missingProperty,\n missingImplementation,\n invalidTypeImp,\n missingPropertyImp,\n unknownPropertyImp,\n invalidTypeDefinition,\n invalidPropertyName,\n readOnlyProperty,\n invalidDocumentOnDbInsert,\n invalidPropertyTypeOnDbUpdate,\n unknownPropertyOnDbUpdate,\n unknownMethod,\n invalidCollectionName,\n invalidResultType,\n unknownComponent,\n invalidParamNumber,\n invalidParamType,\n behaviorNotUnique,\n invalidStateOn,\n invalidStateOff,\n masterSystemNotFound,\n invalidType,\n invalidConfiguration,\n unknownType,\n unknownPath,\n canNotYetValidate,\n invalidChannelEvent,\n invalidParamNumberMethodOn,\n updateUuid,\n invalidUseOfComponent,\n invalidSchema,\n invalidModel,\n invalidParameters,\n destroyedComponentCall,\n invalidConctructorParameters,\n unknownModel,\n missingSchema,\n cyclicDependency,\n invalidEnumType,\n loadSchema,\n loadModel,\n loadType,\n generatingSchema,\n checkModel,\n createClass,\n initDb,\n actionInvokeError,\n invalidSchemaPropertyName,\n invalidSchemaProperty,\n invalidPropertyFormat,\n invalidState,\n unknownContext,\n historyDocumentInserted,\n historyDocumentRemoved,\n historyDocumentUpdated,\n invalidCollectionItem,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module helper\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions used by all the modules\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private property */\n\nlet runtimeRef = null\n\n/* Public method */\n\n/**\n * @method isRuntime\n * @returns {Boolean} true if a System Runtime instance exist\n * @description Check if a System Runtime instance exists\n */\nfunction isRuntime() {\n let result = false\n\n if ($db.collections._Runtime && $db.collections._Runtime.find().length) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method getRuntime\n * @returns {_Runtime} System Runtime instance\n * @description Get the System Runtime instance\n */\nfunction getRuntime() {\n let runtimeId = ''\n let search = $db.collections._Runtime.find()\n\n if (!runtimeRef && search[0]) {\n runtimeId = search[0][$mson.ID]\n runtimeRef = $component.get(runtimeId)\n }\n\n return runtimeRef\n}\n\n/**\n * @method isOnNode\n * @returns {Boolean} true if a System Runtime is running on node\n * @description Check if a System Runtime is running on node\n */\nfunction isOnNode() {\n let result = false\n\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n result = true\n }\n\n return result\n}\n\n/**\n * @method generateId\n * @returns {String} a uuid\n * @description Generate a uuid\n */\nfunction generateId() {\n // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n function gen() {\n return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (Math.random() * 16) | 0\n let v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n }\n\n // force the uuid to start with a letter\n function getPrefix() {\n let validPrefix = 'abcdef'\n return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length))\n }\n\n return getPrefix() + gen()\n}\n\nexport default {\n isRuntime,\n getRuntime,\n isOnNode,\n generateId,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module metamodel\n * @requires db\n * @requires log\n * @requires component\n * @requires workflow\n * @requires helper\n * @requires mson\n * @description This module manages System Runtime metamodel.\n * System Runtime metamodel loads schemas and types, analyzes them and\n * creates the component classes and related DatabaseCollections.\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\nimport $component from './component.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n}\n\n/* Private methods */\n\n/**\n * @method isInternalName\n * @param {String} name\n * @private\n * @description is name an internal name\n */\nfunction isInternalName(name) {\n let result = true\n\n if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {\n result = false\n }\n return result\n}\n\n/**\n * @method generateModels\n * @private\n * @description Generate the models\n */\nfunction generateModels() {\n let att = ''\n let name = ''\n let schemaName = ''\n let schema = {}\n let schemaDef = null\n let modelName = ''\n let modelParent = null\n let modelExt = null\n let modelDef = null\n let model = {}\n let mergedModel = {}\n let parents = []\n let length = 0\n let i = 0\n let j = 0\n let nbAncestors = 0\n let sortInheritTree = []\n\n // default values\n for (schemaName in store.generatedSchemas) {\n schema = store.generatedSchemas[schemaName]\n\n // set model internal properties\n model = {\n _name: schema[$mson.NAME],\n }\n\n // set _core\n if (typeof schema[$mson.CORE] !== 'undefined') {\n model[$mson.CORE] = schema[$mson.CORE]\n }\n\n // set inherit\n if (Array.isArray(schema[$mson.INHERIT])) {\n model[$mson.INHERIT] = schema[$mson.INHERIT]\n }\n\n // set class\n if (typeof schema[$mson.CLASS] !== 'undefined') {\n model[$mson.CLASS] = schema[$mson.CLASS]\n }\n\n // set description\n if (typeof schema[$mson.DESCRIPTION] !== 'undefined') {\n model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]\n }\n\n // check valid name\n for (att in schema) {\n if (!isInternalName(att) && att.indexOf('_') === 0) {\n $log.invalidSchemaPropertyName(schema[$mson.NAME], att)\n }\n }\n\n // set model default values\n for (att in schema) {\n switch (true) {\n case schema[att] === 'property':\n model[att] = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'link':\n model[att] = {\n type: '_Component',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'method':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n result: 'any',\n description: att,\n }\n break\n case schema[att] === 'event':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n description: att,\n }\n break\n case schema[att] === 'collection':\n model[att] = {\n type: ['_Component'],\n readOnly: false,\n mandatory: false,\n default: [],\n description: att,\n label: att,\n }\n break\n default:\n if (!isInternalName(att)) {\n $log.invalidSchemaProperty(schema[$mson.NAME], att)\n }\n break\n }\n }\n\n store.generatedModels[model[$mson.NAME]] = model\n }\n\n // models to override\n for (modelName in store.generatedModels) {\n model = store.generatedModels[modelName]\n name = model[$mson.NAME]\n modelExt = store.models[name]\n if (modelExt) {\n mergedModel = merge(modelExt, model)\n store.generatedModels[name] = mergedModel\n }\n }\n\n // inheritance\n sortInheritTree = sortInheritanceTree()\n\n nbAncestors = sortInheritTree.length\n for (i = 0; i < nbAncestors; i++) {\n modelName = sortInheritTree[i]\n model = store.generatedModels[modelName]\n\n if (model) {\n parents = getParents(modelName)\n parents.reverse()\n\n length = parents.length\n for (j = 0; j < length; j++) {\n name = parents[j]\n modelParent = store.generatedModels[name]\n if (modelParent) {\n mergedModel = merge(modelParent, model)\n store.generatedModels[modelName] = mergedModel\n }\n }\n\n // last inherit\n // is the overriden model\n modelExt = store.models[modelName]\n if (modelExt) {\n mergedModel = merge(modelExt, store.generatedModels[modelName])\n store.generatedModels[modelName] = mergedModel\n }\n }\n }\n\n // save\n for (schemaName in store.generatedSchemas) {\n schemaDef = store.generatedSchemas[schemaName]\n $db.collections._GeneratedSchema.insert(schemaDef)\n }\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n $db.collections._GeneratedModel.insert(modelDef)\n }\n}\n\n/**\n * @method loadInMemory\n * @private\n * @description Load schemas and types in memory\n */\nfunction loadInMemory() {\n let schemas = []\n let types = []\n let schema = null\n let model = {}\n let models = []\n let type = null\n let name = ''\n let inherit = ''\n let i = 0\n let length = 0\n\n // init store\n store.inheritance = {}\n store.inheritanceTree = {}\n store.schemas = {}\n store.generatedSchemas = {}\n store.models = {}\n store.generatedModels = {}\n store.states = {}\n store.type = {}\n\n // load schemas\n schemas = $db.collections._Schema.find({})\n\n length = schemas.length\n for (i = 0; i < length; i++) {\n schema = schemas[i]\n\n name = schema[$mson.NAME]\n inherit = schema[$mson.INHERIT]\n\n store.schemas[name] = schema\n if (inherit) {\n store.inheritance[name] = inherit\n }\n\n if (!schema[$mson.CORE]) {\n $log.loadSchema(name)\n }\n }\n\n // load models\n models = $db.collections._Model.find({})\n\n length = models.length\n for (i = 0; i < length; i++) {\n model = models[i]\n name = model[$mson.NAME]\n\n store.models[name] = model\n\n if (!model[$mson.CORE]) {\n $log.loadModel(name)\n }\n }\n\n // load types\n types = $db.collections._Type.find({})\n\n length = types.length\n for (i = 0; i < length; i++) {\n type = types[i]\n store.type[type.name] = type\n\n if (!type.core) {\n $log.loadType(type.name)\n }\n }\n}\n\n/**\n * @method createInheritanceTree\n * @private\n * @description Create the inheritance tree\n */\nfunction createInheritanceTree() {\n let name = ''\n let c3linerization = []\n let ancestors = []\n\n /**\n *\n * @param {Array} elts array of elts\n * @returns {Boolean} true if all the arrays are empty\n * @private\n * @description Check if we have finisehd to linerize\n */\n function _isEmpty(elts) {\n let i = 0\n let length = 0\n let result = true\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].length) {\n result = false\n }\n }\n return result\n }\n\n /**\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @private\n * @description Remove an elt from all the arrays\n */\n function _removeCandidate(elt, elts) {\n let i = 0\n let length = 0\n let arr = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) === 0) {\n arr = elts[i]\n arr.reverse()\n arr.pop()\n arr.reverse()\n elts[i] = arr\n }\n }\n }\n\n /**\n * @method _isCandidate\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @returns {Boolean} true if the element is a good candidate.\n * @private\n * @description Check the element is a good candidate\n */\n function _isCandidate(elt, elts) {\n let result = true\n let i = 0\n let length = 0\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) > 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"5.1.0\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"5.1.0\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"5.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,CAAC,WAAY,aAAc,OAAQ,SAAU,SAiHlEC,cA/GoB,CACpB,UACA,SACA,SACA,SACA,WACA,QACA,OACA,OAwGAC,kBArGwB,CACxBC,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,CACLF,KAAM,SACNC,WAAW,GAEbE,SAAU,CACRH,KAAM,CAAC,UACPC,WAAW,EACXG,QAAS,CAAC,eAEZC,OAAQ,CACNL,KAAM,UACNC,WAAW,GAEbK,MAAO,CACLN,KAAM,UACNC,WAAW,G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BJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file diff --git a/extensions/mode-admin-server.json b/extensions/mode-admin-server.json index e0c5462..2369120 100755 --- a/extensions/mode-admin-server.json +++ b/extensions/mode-admin-server.json @@ -1,455 +1 @@ -{ - "name": "mode-admin-server", - "master": false, - "version": "1.0.0", - "description": "", - "schemas": { - "1723516a30132ac": { - "_name": "_Database", - "_inherit": ["_Component"], - "_core": true, - "insert": "event", - "update": "event", - "remove": "event", - "_id": "1723516a30132ac" - }, - "10374180581a41f": { - "_id": "10374180581a41f", - "_name": "_Admin", - "_inherit": ["_Component"], - "_core": true - }, - "104ad1f48518376": { - "_id": "104ad1f48518376", - "_name": "_Channel", - "_core": true, - "$editorUpdateSystem": "event", - "$editorUpdateSchema": "event", - "$editorUpdateSchemaId": "event", - "$editorUpdateSchemaName": "event", - "$editorUpdateModel": "event", - "$editorUpdateModelId": "event", - "$editorUpdateType": "event", - "$editorDeleteType": "event", - "$editorUpdateBehavior": "event", - "$editorDeleteBehavior": "event", - "$editorUpdateComponent": "event", - "$editorUpdateComponentId": "event", - "$editorDeleteComponent": "event", - "$appLogDebug": "event", - "$appLogInfo": "event", - "$appLogWarn": "event", - "$appLogError": "event", - "$appLoadSystem": "event", - "$designerSync": "event", - "$designerCreateBehavior": "event", - "$designerCreateComponent": "event", - "$designerCreateType": "event", - "$designerCreateSchema": "event", - "$designerCreateModel": "event", - "$designerDeleteSchema": "event", - "$designerDeleteModel": "event", - "$designerDeleteType": "event", - "$designerDeleteBehavior": "event", - "$designerDeleteComponent": "event", - "$designerUpdateComponent": "event", - "$designerUpdateModel": "event", - "$designerUpdateBehavior": "event", - "$runtimeCreateComponent": "event", - "$runtimeDeleteComponent": "event", - "$runtimeUpdateComponent": "event", - "send": "event" - } - }, - "models": { - "18a51169d7112d4": { - "_name": "_Database", - "_core": true, - "insert": { "params": [{ "name": "event", "type": "dbInsertEvent" }] }, - "update": { "params": [{ "name": "event", "type": "dbUpdateEvent" }] }, - "remove": { "params": [{ "name": "event", "type": "dbRemoveEvent" }] }, - "_id": "18a51169d7112d4" - }, - "138a81fa1f16435": { - "_id": "138a81fa1f16435", - "_name": "_Admin", - "_inherit": ["_Component"], - "_core": true - }, - "135c71078810af2": { - "_id": "135c71078810af2", - "_name": "_Channel", - "_inherit": ["_Component"], - "_core": true, - "$editorUpdateSchemaName": { - "params": [ - { "name": "name", "type": "string" }, - { "name": "id", "type": "string" } - ] - }, - "$designerSync": { "params": [{ "name": "req", "type": "object" }] }, - "$appLoadSystem": { "params": [{ "name": "system", "type": "object" }] }, - "$designerCreateBehavior": { - "params": [{ "name": "behavior", "type": "object" }] - }, - "$editorUpdateBehavior": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "behavior", "type": "object" } - ] - }, - "$designerUpdateBehavior": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "behavior", "type": "object" } - ] - }, - "$editorDeleteBehavior": { - "params": [{ "name": "id", "type": "string" }] - }, - "$designerDeleteBehavior": { - "params": [{ "name": "id", "type": "string" }] - }, - "$designerCreateComponent": { - "params": [ - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$editorUpdateComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$editorUpdateComponentId": { - "params": [ - { "name": "oldId", "type": "string" }, - { "name": "newId", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$designerUpdateComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$editorDeleteComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$designerDeleteComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$designerCreateType": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "type", "type": "object" } - ] - }, - "$editorUpdateType": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "type", "type": "object" } - ] - }, - "$editorDeleteType": { "params": [{ "name": "id", "type": "string" }] }, - "$designerCreateSchema": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "schema", "type": "object" } - ] - }, - "$editorUpdateSchema": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "schema", "type": "object" } - ] - }, - "$editorUpdateSchemaId": { - "params": [ - { "name": "oldId", "type": "string" }, - { "name": "newId", "type": "string" } - ] - }, - "$designerDeleteSchema": { - "params": [{ "name": "id", "type": "string" }] - }, - "$designerCreateModel": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "model", "type": "object" } - ] - }, - "$editorUpdateModel": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "model", "type": "object" } - ] - }, - "$designerUpdateModel": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "model", "type": "object" } - ] - }, - "$editorUpdateModelId": { - "params": [ - { "name": "oldId", "type": "string" }, - { "name": "newId", "type": "string" } - ] - }, - "$designerDeleteModel": { - "params": [{ "name": "id", "type": "string" }] - }, - "$editorUpdateSystem": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "system", "type": "object" } - ] - }, - "$appLogDebug": { "params": [{ "name": "message", "type": "string" }] }, - "$appLogInfo": { "params": [{ "name": "message", "type": "string" }] }, - "$appLogWarn": { "params": [{ "name": "message", "type": "string" }] }, - "$appLogError": { "params": [{ "name": "message", "type": "string" }] }, - "$runtimeCreateComponent": { - "params": [ - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$runtimeDeleteComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$runtimeUpdateComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" }, - { "name": "field", "type": "string" }, - { "name": "value", "type": "any" } - ] - }, - "send": { "params": [{ "name": "message", "type": "message" }] } - } - }, - "behaviors": { - "h1b3891699319be4": { - "_id": "h1b3891699319be4", - "component": "channel", - "state": "$designerCreateSchema", - "action": "function $designerCreateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "w161ae196d51f585": { - "_id": "w161ae196d51f585", - "component": "channel", - "state": "$editorUpdateSchema", - "action": "function $editorUpdateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "x12449136a811be2": { - "_id": "x12449136a811be2", - "component": "channel", - "state": "$designerDeleteSchema", - "action": "function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": true, - "core": true - }, - "h103b01d9591bbb4": { - "_id": "h103b01d9591bbb4", - "component": "channel", - "state": "$designerCreateModel", - "action": "function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "r12c4e1d6cf1cf0e": { - "_id": "r12c4e1d6cf1cf0e", - "component": "channel", - "state": "$editorUpdateModel", - "action": "function $editorUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "x1eb4c1d03b1ee34": { - "_id": "x1eb4c1d03b1ee34", - "component": "channel", - "state": "$designerUpdateModel", - "action": "function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "w1c68e1c7aa19326": { - "_id": "w1c68e1c7aa19326", - "component": "channel", - "state": "$designerDeleteModel", - "action": "function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": true, - "core": true - }, - "x1f6bc11b3816de0": { - "_id": "x1f6bc11b3816de0", - "component": "channel", - "state": "$designerCreateType", - "action": "function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "m1ff4f11d19164c0": { - "_id": "m1ff4f11d19164c0", - "component": "channel", - "state": "$editorUpdateType", - "action": "function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "u1e8bd17bdc15d6a": { - "_id": "u1e8bd17bdc15d6a", - "component": "channel", - "state": "$editorDeleteType", - "action": "function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": true, - "core": true - }, - "k18a311f76f1ff2a": { - "_id": "k18a311f76f1ff2a", - "component": "channel", - "state": "$designerDeleteType", - "action": "function $designerDeleteType() { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": true, - "core": true - }, - "i1fe2e1f8fe1f3b7": { - "_id": "i1fe2e1f8fe1f3b7", - "component": "channel", - "state": "$designerCreateComponent", - "action": "function $designerCreateComponent(collection, component) { \n $db.collections[collection].insert(component);\t\n}", - "useCoreAPI": true, - "core": true - }, - "e1cc381f58818dd4": { - "_id": "e1cc381f58818dd4", - "component": "channel", - "state": "$editorUpdateComponent", - "action": "function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}", - "useCoreAPI": true, - "core": true - }, - "r18f80173fe19997": { - "_id": "r18f80173fe19997", - "component": "channel", - "state": "$editorUpdateComponent", - "action": "function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}", - "useCoreAPI": true, - "core": true - }, - "o1ed5a1768c181b2": { - "_id": "o1ed5a1768c181b2", - "component": "channel", - "state": "$editorDeleteComponent", - "action": "function $editorDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}", - "useCoreAPI": true, - "core": true - }, - "t18fe213b0718b38": { - "_id": "t18fe213b0718b38", - "component": "channel", - "state": "$designerDeleteComponent", - "action": "function $designerDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}", - "useCoreAPI": true, - "core": true - }, - "p1524e1d2c414a17": { - "_id": "p1524e1d2c414a17", - "component": "channel", - "state": "$designerCreateBehavior", - "action": "function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n}", - "useCoreAPI": true, - "core": true - }, - "m154451abb8103f1": { - "_id": "m154451abb8103f1", - "component": "channel", - "state": "$editorUpdateBehavior", - "action": "function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require(behavior.component).start();\n }\n }\n}", - "useCoreAPI": true, - "core": true - }, - "q131b819d531053f": { - "_id": "q131b819d531053f", - "component": "channel", - "state": "$editorDeleteBehavior", - "action": "function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}", - "useCoreAPI": true, - "core": true - }, - "h1214316cb61ea28": { - "_id": "h1214316cb61ea28", - "component": "channel", - "state": "$designerDeleteBehavior", - "action": "function $designerDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}", - "useCoreAPI": true, - "core": true - }, - "h109eb1b4ed148fd": { - "_id": "h109eb1b4ed148fd", - "component": "channel", - "state": "$designerSync", - "action": "function $designerSync(req) { \n req.end(this.require('runtime').bundle());\t\n}", - "useCoreAPI": true, - "core": true - }, - "w1a9961205712671": { - "_id": "w1a9961205712671", - "component": "db", - "state": "insert", - "action": "function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "j122701697c19935": { - "_id": "j122701697c19935", - "component": "db", - "state": "remove", - "action": "function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "t118f61f6d0127e4": { - "_id": "t118f61f6d0127e4", - "component": "db", - "state": "update", - "action": "function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "e10ba11978d122c5": { - "_id": "e10ba11978d122c5", - "component": "admin", - "state": "init", - "action": "function init(conf) {\n let require = require,\n http = require('http'),\n qs = require('querystring'),\n runtime = require('system-runtime');\n\n // Create server\n http.createServer(function (req, res) {\n let message = null;\n\n // POST\n if (req.method == 'POST') {\n let body = '';\n req.on('data', function (data) {\n body = body + data;\n if (body.length > 1e6) {\n req.connection.destroy();\n }\n });\n req.on('end', function () {\n let post = qs.parse(body),\n message = {};\n\n function _postToMessage(url, post) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n }\n }\n\n message.event = event;\n message.data = JSON.parse(decodeURIComponent(Object.keys(post)[0]));\n\n return message;\n }\n\n message = _postToMessage(req.url, post);\n runtime.message(message);\n });\n }\n\n // GET\n if (req.method == 'GET') {\n function _getToMessage(url, res) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n if (url.indexOf('favicon.ico') !== -1) {\n message = null;\n } else {\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n } else {\n data.push(params[i]);\n }\n }\n data.push(res);\n\n message.event = event;\n message.data = data;\n\n if (event === '') {\n message = null;\n }\n }\n return message;\n }\n\n res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });\n message = _getToMessage(req.url, res);\n\n if (message) {\n runtime.message(message);\n } else {\n res.end('');\n }\n }\n }).listen(8888, '127.0.0.1');\n\n console.log('System Runtime Admin is started on http://127.0.0.1:8888');\n}", - "useCoreAPI": true, - "core": true - } - }, - "types": {}, - "components": { - "_Admin": { "admin": { "_id": "admin", "_core": true } }, - "_Channel": { "channel": { "_id": "channel" } }, - "_Database": { "db": { "_id": "db" } } - }, - "_id": "q1e1a01bbb514f49" -} +{"name":"mode-admin-server","master":false,"version":"1.0.0","description":"","schemas":{"1723516a30132ac":{"_name":"_Database","_inherit":["_Component"],"_core":true,"insert":"event","update":"event","remove":"event","_id":"1723516a30132ac"},"10374180581a41f":{"_id":"10374180581a41f","_name":"_Admin","_inherit":["_Component"],"_core":true},"104ad1f48518376":{"_id":"104ad1f48518376","_name":"_Channel","_core":true,"$editorUpdateSystem":"event","$editorUpdateSchema":"event","$editorUpdateSchemaId":"event","$editorUpdateSchemaName":"event","$editorUpdateModel":"event","$editorUpdateModelId":"event","$editorUpdateType":"event","$editorDeleteType":"event","$editorUpdateBehavior":"event","$editorDeleteBehavior":"event","$editorUpdateComponent":"event","$editorUpdateComponentId":"event","$editorDeleteComponent":"event","$appLogDebug":"event","$appLogInfo":"event","$appLogWarn":"event","$appLogError":"event","$appLoadSystem":"event","$designerSync":"event","$designerCreateBehavior":"event","$designerCreateComponent":"event","$designerCreateType":"event","$designerCreateSchema":"event","$designerCreateModel":"event","$designerDeleteSchema":"event","$designerDeleteModel":"event","$designerDeleteType":"event","$designerDeleteBehavior":"event","$designerDeleteComponent":"event","$designerUpdateComponent":"event","$designerUpdateModel":"event","$designerUpdateBehavior":"event","$runtimeCreateComponent":"event","$runtimeDeleteComponent":"event","$runtimeUpdateComponent":"event","send":"event"}},"models":{"18a51169d7112d4":{"_name":"_Database","_core":true,"insert":{"params":[{"name":"event","type":"dbInsertEvent"}]},"update":{"params":[{"name":"event","type":"dbUpdateEvent"}]},"remove":{"params":[{"name":"event","type":"dbRemoveEvent"}]},"_id":"18a51169d7112d4"},"138a81fa1f16435":{"_id":"138a81fa1f16435","_name":"_Admin","_inherit":["_Component"],"_core":true},"135c71078810af2":{"_id":"135c71078810af2","_name":"_Channel","_inherit":["_Component"],"_core":true,"$editorUpdateSchemaName":{"params":[{"name":"name","type":"string"},{"name":"id","type":"string"}]},"$designerSync":{"params":[{"name":"req","type":"object"}]},"$appLoadSystem":{"params":[{"name":"system","type":"object"}]},"$designerCreateBehavior":{"params":[{"name":"behavior","type":"object"}]},"$editorUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$designerUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$editorDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponentId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"},{"name":"collection","type":"string"}]},"$designerUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerCreateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorUpdateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchemaId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteSchema":{"params":[{"name":"id","type":"string"}]},"$designerCreateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$designerUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModelId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteModel":{"params":[{"name":"id","type":"string"}]},"$editorUpdateSystem":{"params":[{"name":"id","type":"string"},{"name":"system","type":"object"}]},"$appLogDebug":{"params":[{"name":"message","type":"string"}]},"$appLogInfo":{"params":[{"name":"message","type":"string"}]},"$appLogWarn":{"params":[{"name":"message","type":"string"}]},"$appLogError":{"params":[{"name":"message","type":"string"}]},"$runtimeCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$runtimeDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$runtimeUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"field","type":"string"},{"name":"value","type":"any"}]},"send":{"params":[{"name":"message","type":"message"}]}}},"behaviors":{"h1b3891699319be4":{"_id":"h1b3891699319be4","component":"channel","state":"$designerCreateSchema","action":"function $designerCreateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w161ae196d51f585":{"_id":"w161ae196d51f585","component":"channel","state":"$editorUpdateSchema","action":"function $editorUpdateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x12449136a811be2":{"_id":"x12449136a811be2","component":"channel","state":"$designerDeleteSchema","action":"function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"h103b01d9591bbb4":{"_id":"h103b01d9591bbb4","component":"channel","state":"$designerCreateModel","action":"function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"r12c4e1d6cf1cf0e":{"_id":"r12c4e1d6cf1cf0e","component":"channel","state":"$editorUpdateModel","action":"function $editorUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x1eb4c1d03b1ee34":{"_id":"x1eb4c1d03b1ee34","component":"channel","state":"$designerUpdateModel","action":"function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w1c68e1c7aa19326":{"_id":"w1c68e1c7aa19326","component":"channel","state":"$designerDeleteModel","action":"function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"x1f6bc11b3816de0":{"_id":"x1f6bc11b3816de0","component":"channel","state":"$designerCreateType","action":"function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"m1ff4f11d19164c0":{"_id":"m1ff4f11d19164c0","component":"channel","state":"$editorUpdateType","action":"function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"u1e8bd17bdc15d6a":{"_id":"u1e8bd17bdc15d6a","component":"channel","state":"$editorDeleteType","action":"function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"k18a311f76f1ff2a":{"_id":"k18a311f76f1ff2a","component":"channel","state":"$designerDeleteType","action":"function $designerDeleteType() { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"i1fe2e1f8fe1f3b7":{"_id":"i1fe2e1f8fe1f3b7","component":"channel","state":"$designerCreateComponent","action":"function $designerCreateComponent(collection, component) { \n $db.collections[collection].insert(component);\t\n}","useCoreAPI":true,"core":true},"e1cc381f58818dd4":{"_id":"e1cc381f58818dd4","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"r18f80173fe19997":{"_id":"r18f80173fe19997","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"o1ed5a1768c181b2":{"_id":"o1ed5a1768c181b2","component":"channel","state":"$editorDeleteComponent","action":"function $editorDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"t18fe213b0718b38":{"_id":"t18fe213b0718b38","component":"channel","state":"$designerDeleteComponent","action":"function $designerDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"p1524e1d2c414a17":{"_id":"p1524e1d2c414a17","component":"channel","state":"$designerCreateBehavior","action":"function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n}","useCoreAPI":true,"core":true},"m154451abb8103f1":{"_id":"m154451abb8103f1","component":"channel","state":"$editorUpdateBehavior","action":"function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require(behavior.component).start();\n }\n }\n}","useCoreAPI":true,"core":true},"q131b819d531053f":{"_id":"q131b819d531053f","component":"channel","state":"$editorDeleteBehavior","action":"function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h1214316cb61ea28":{"_id":"h1214316cb61ea28","component":"channel","state":"$designerDeleteBehavior","action":"function $designerDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h109eb1b4ed148fd":{"_id":"h109eb1b4ed148fd","component":"channel","state":"$designerSync","action":"function $designerSync(req) { \n req.end(this.require('runtime').bundle());\t\n}","useCoreAPI":true,"core":true},"w1a9961205712671":{"_id":"w1a9961205712671","component":"db","state":"insert","action":"function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}","useCoreAPI":false,"core":true},"j122701697c19935":{"_id":"j122701697c19935","component":"db","state":"remove","action":"function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}","useCoreAPI":false,"core":true},"t118f61f6d0127e4":{"_id":"t118f61f6d0127e4","component":"db","state":"update","action":"function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}","useCoreAPI":false,"core":true},"e10ba11978d122c5":{"_id":"e10ba11978d122c5","component":"admin","state":"init","action":"async function init(conf) {\n let http = await import('http'),\n qs = await import('querystring'),\n runtime = await import ('system-runtime');\n\n // Create server\n http.createServer(function (req, res) {\n let message = null;\n\n // POST\n if (req.method == 'POST') {\n let body = '';\n req.on('data', function (data) {\n body = body + data;\n if (body.length > 1e6) {\n req.connection.destroy();\n }\n });\n req.on('end', function () {\n let post = qs.parse(body),\n message = {};\n\n function _postToMessage(url, post) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n }\n }\n\n message.event = event;\n message.data = JSON.parse(decodeURIComponent(Object.keys(post)[0]));\n\n return message;\n }\n\n message = _postToMessage(req.url, post);\n runtime.message(message);\n });\n }\n\n // GET\n if (req.method == 'GET') {\n function _getToMessage(url, res) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n if (url.indexOf('favicon.ico') !== -1) {\n message = null;\n } else {\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n } else {\n data.push(params[i]);\n }\n }\n data.push(res);\n\n message.event = event;\n message.data = data;\n\n if (event === '') {\n message = null;\n }\n }\n return message;\n }\n\n res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });\n message = _getToMessage(req.url, res);\n\n if (message) {\n runtime.message(message);\n } else {\n res.end('');\n }\n }\n }).listen(8888, '127.0.0.1');\n\n console.log('System Runtime Admin is started on http://127.0.0.1:8888');\n}","useCoreAPI":true,"core":true}},"types":{},"components":{"_Admin":{"admin":{"_id":"admin","_core":true}},"_Channel":{"channel":{"_id":"channel"}},"_Database":{"db":{"_id":"db"}}},"_id":"q1e1a01bbb514f49"} \ No newline at end of file diff --git a/extensions/mode-admin.json b/extensions/mode-admin.json index 5c265d2..5d9a7cb 100755 --- a/extensions/mode-admin.json +++ b/extensions/mode-admin.json @@ -1,550 +1 @@ -{ - "name": "mode-admin", - "master": false, - "version": "1.0.0", - "description": "Enable connection to System Designer", - "schemas": { - "1723516a30132ac": { - "_name": "_Database", - "_inherit": ["_Component"], - "_core": true, - "insert": "event", - "update": "event", - "remove": "event", - "_id": "1723516a30132ac" - }, - "10374180581a41f": { - "_id": "10374180581a41f", - "_name": "_Admin", - "_inherit": ["_Component"], - "_core": true, - "designerWindow": "property" - }, - "104ad1f48518376": { - "_id": "104ad1f48518376", - "_name": "_Channel", - "_core": true, - "$editorUpdateSystem": "event", - "$editorUpdateSchema": "event", - "$editorUpdateSchemaId": "event", - "$editorUpdateSchemaName": "event", - "$editorUpdateModel": "event", - "$editorUpdateModelId": "event", - "$editorUpdateType": "event", - "$editorDeleteType": "event", - "$editorUpdateBehavior": "event", - "$editorDeleteBehavior": "event", - "$editorUpdateComponent": "event", - "$editorUpdateComponentId": "event", - "$editorDeleteComponent": "event", - "$appLogDebug": "event", - "$appLogInfo": "event", - "$appLogWarn": "event", - "$appLogError": "event", - "$appLoadSystem": "event", - "$designerSync": "event", - "$designerCreateBehavior": "event", - "$designerCreateComponent": "event", - "$designerCreateType": "event", - "$designerCreateSchema": "event", - "$designerCreateModel": "event", - "$designerDeleteSchema": "event", - "$designerDeleteModel": "event", - "$designerDeleteType": "event", - "$designerDeleteBehavior": "event", - "$designerDeleteComponent": "event", - "$designerUpdateComponent": "event", - "$designerUpdateModel": "event", - "$designerUpdateBehavior": "event", - "$designerSetSystem": "event", - "$runtimeCreateComponent": "event", - "$runtimeDeleteComponent": "event", - "$runtimeUpdateComponent": "event", - "send": "event" - }, - "1268f1dddd1fea7": { - "_name": "_Logger", - "_core": true, - "level": "property", - "debug": "method", - "info": "method", - "warn": "method", - "error": "method", - "_id": "1268f1dddd1fea7" - } - }, - "models": { - "18a51169d7112d4": { - "_name": "_Database", - "_core": true, - "insert": { "params": [{ "name": "event", "type": "dbInsertEvent" }] }, - "update": { "params": [{ "name": "event", "type": "dbUpdateEvent" }] }, - "remove": { "params": [{ "name": "event", "type": "dbRemoveEvent" }] }, - "_id": "18a51169d7112d4" - }, - "138a81fa1f16435": { - "_id": "138a81fa1f16435", - "_name": "_Admin", - "_inherit": ["_Component"], - "_core": true, - "designerWindow": { - "type": "object", - "readOnly": false, - "mandatory": false, - "default": null - } - }, - "135c71078810af2": { - "_id": "135c71078810af2", - "_name": "_Channel", - "_inherit": ["_Component"], - "_core": true, - "$editorUpdateSchemaName": { - "params": [ - { "name": "name", "type": "string" }, - { "name": "id", "type": "string" } - ] - }, - "$designerSync": {}, - "$appLoadSystem": { "params": [{ "name": "system", "type": "object" }] }, - "$designerCreateBehavior": { - "params": [{ "name": "behavior", "type": "object" }] - }, - "$editorUpdateBehavior": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "behavior", "type": "object" } - ] - }, - "$designerUpdateBehavior": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "behavior", "type": "object" } - ] - }, - "$editorDeleteBehavior": { - "params": [{ "name": "id", "type": "string" }] - }, - "$designerDeleteBehavior": { - "params": [{ "name": "id", "type": "string" }] - }, - "$designerCreateComponent": { - "params": [ - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$editorUpdateComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$editorUpdateComponentId": { - "params": [ - { "name": "oldId", "type": "string" }, - { "name": "newId", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$designerUpdateComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$editorDeleteComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$designerDeleteComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$designerDeleteType": { "params": [{ "name": "id", "type": "string" }] }, - "$designerCreateType": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "type", "type": "object" } - ] - }, - "$editorUpdateType": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "type", "type": "object" } - ] - }, - "$editorDeleteType": { "params": [{ "name": "id", "type": "string" }] }, - "$designerCreateSchema": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "schema", "type": "object" } - ] - }, - "$editorUpdateSchema": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "schema", "type": "object" } - ] - }, - "$editorUpdateSchemaId": { - "params": [ - { "name": "oldId", "type": "string" }, - { "name": "newId", "type": "string" } - ] - }, - "$designerDeleteSchema": { - "params": [{ "name": "id", "type": "string" }] - }, - "$designerCreateModel": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "model", "type": "object" } - ] - }, - "$editorUpdateModel": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "model", "type": "object" } - ] - }, - "$designerUpdateModel": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "model", "type": "object" } - ] - }, - "$editorUpdateModelId": { - "params": [ - { "name": "oldId", "type": "string" }, - { "name": "newId", "type": "string" } - ] - }, - "$designerDeleteModel": { - "params": [{ "name": "id", "type": "string" }] - }, - "$editorUpdateSystem": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "system", "type": "object" } - ] - }, - "$appLogDebug": { "params": [{ "name": "message", "type": "string" }] }, - "$appLogInfo": { "params": [{ "name": "message", "type": "string" }] }, - "$appLogWarn": { "params": [{ "name": "message", "type": "string" }] }, - "$appLogError": { "params": [{ "name": "message", "type": "string" }] }, - "$runtimeCreateComponent": { - "params": [ - { "name": "collection", "type": "string" }, - { "name": "component", "type": "object" } - ] - }, - "$runtimeDeleteComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" } - ] - }, - "$runtimeUpdateComponent": { - "params": [ - { "name": "id", "type": "string" }, - { "name": "collection", "type": "string" }, - { "name": "field", "type": "string" }, - { "name": "value", "type": "any" } - ] - }, - "send": { "params": [{ "name": "message", "type": "message" }] }, - "$designerSetSystem": { - "params": [ - { - "name": "system", - "type": "object", - "mandatory": false, - "default": {} - } - ] - } - }, - "16b9d1ac2216ffe": { - "_id": "16b9d1ac2216ffe", - "_name": "_Logger", - "_core": true, - "level": { - "type": "log", - "readOnly": false, - "mandatory": false, - "default": "warn" - }, - "debug": { "params": [{ "name": "message", "type": "any" }] }, - "info": { "params": [{ "name": "message", "type": "any" }] }, - "warn": { "params": [{ "name": "message", "type": "any" }] }, - "error": { "params": [{ "name": "message", "type": "any" }] } - } - }, - "behaviors": { - "g198c91f8601d02f": { - "_id": "g198c91f8601d02f", - "component": "channel", - "state": "send", - "action": "function send(message) { \n if (this.require('admin').designerWindow()) {\n this.require('admin').designerWindow().postMessage(JSON.stringify(message), '*');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "h1b3891699319be4": { - "_id": "h1b3891699319be4", - "component": "channel", - "state": "$designerCreateSchema", - "action": "function $designerCreateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been created');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "w161ae196d51f585": { - "_id": "w161ae196d51f585", - "component": "channel", - "state": "$editorUpdateSchema", - "action": "function $editorUpdateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n \n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been updated');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "x12449136a811be2": { - "_id": "x12449136a811be2", - "component": "channel", - "state": "$designerDeleteSchema", - "action": "function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n \n this.require('logger').debug(modelName + ' class has been deleted');\n}", - "useCoreAPI": true, - "core": true - }, - "h103b01d9591bbb4": { - "_id": "h103b01d9591bbb4", - "component": "channel", - "state": "$designerCreateModel", - "action": "function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "r12c4e1d6cf1cf0e": { - "_id": "r12c4e1d6cf1cf0e", - "component": "channel", - "state": "$editorUpdateModel", - "action": "function $editorUpdateModel(id, model) { \n if (model && model._name) {\n this.require('logger').debug('analyzing ' + model._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (model && model._name) {\n this.require('logger').debug(model._name + ' has been updated');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "x1eb4c1d03b1ee34": { - "_id": "x1eb4c1d03b1ee34", - "component": "channel", - "state": "$designerUpdateModel", - "action": "function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": false, - "core": true - }, - "w1c68e1c7aa19326": { - "_id": "w1c68e1c7aa19326", - "component": "channel", - "state": "$designerDeleteModel", - "action": "function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\n}", - "useCoreAPI": true, - "core": true - }, - "x1f6bc11b3816de0": { - "_id": "x1f6bc11b3816de0", - "component": "channel", - "state": "$designerCreateType", - "action": "function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been created');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "m1ff4f11d19164c0": { - "_id": "m1ff4f11d19164c0", - "component": "channel", - "state": "$editorUpdateType", - "action": "function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been updated');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "u1e8bd17bdc15d6a": { - "_id": "u1e8bd17bdc15d6a", - "component": "channel", - "state": "$editorDeleteType", - "action": "function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}", - "useCoreAPI": true, - "core": true - }, - "k18a311f76f1ff2a": { - "_id": "k18a311f76f1ff2a", - "component": "channel", - "state": "$designerDeleteType", - "action": "function $designerDeleteType(id) { \n let search = $db.collections._Type.find({ 'name': id });\n let type = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type) {\n this.require('logger').debug(type.name + ' type has been deleted');\n }\n}", - "useCoreAPI": true, - "core": true - }, - "i1fe2e1f8fe1f3b7": { - "_id": "i1fe2e1f8fe1f3b7", - "component": "channel", - "state": "$designerCreateComponent", - "action": "function $designerCreateComponent(collection, component) { \n if ($db.collections[collection]) {\n $db.collections[collection].insert(component);\t\n } else {\n if (component && component._id) {\n this.require('logger').debug('can not create \\'' + component._id + '\\' component: ' + collection +' model does not exit');\n }\n }\n}", - "useCoreAPI": true, - "core": true - }, - "e1cc381f58818dd4": { - "_id": "e1cc381f58818dd4", - "component": "channel", - "state": "$editorUpdateComponent", - "action": "function $editorUpdateComponent(id, collection, component) { \n if ($db.collections[collection]) {\n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n } else {\n this.require('logger').debug('can not update \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}", - "useCoreAPI": true, - "core": true - }, - "o1ed5a1768c181b2": { - "_id": "o1ed5a1768c181b2", - "component": "channel", - "state": "$editorDeleteComponent", - "action": "function $editorDeleteComponent(id, collection) { \n if ($db.collections[collection]) {\n $db.collections[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}", - "useCoreAPI": true, - "core": true - }, - "t18fe213b0718b38": { - "_id": "t18fe213b0718b38", - "component": "channel", - "state": "$designerDeleteComponent", - "action": "function $designerDeleteComponent(id, collection) { \n if ($db.collections[collection]) {\n $db.collections[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}", - "useCoreAPI": true, - "core": true - }, - "p1524e1d2c414a17": { - "_id": "p1524e1d2c414a17", - "component": "channel", - "state": "$designerCreateBehavior", - "action": "function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n \n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been created');\n}", - "useCoreAPI": true, - "core": true - }, - "m154451abb8103f1": { - "_id": "m154451abb8103f1", - "component": "channel", - "state": "$editorUpdateBehavior", - "action": "function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require('logger').debug(behavior.state + ' behavior of the system has been updated');\n this.require('logger').debug('restarting the system...');\n this.require(behavior.component).start();\n } else {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been updated');\n }\n }\telse {\n this.require('logger').debug('can not update ' + behavior.state + ' behavior (\\'' + behavior.component + '\\' component): the component does not exist');\n }\n}", - "useCoreAPI": false, - "core": true - }, - "q131b819d531053f": { - "_id": "q131b819d531053f", - "component": "channel", - "state": "$editorDeleteBehavior", - "action": "function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}", - "useCoreAPI": true, - "core": true - }, - "h1214316cb61ea28": { - "_id": "h1214316cb61ea28", - "component": "channel", - "state": "$designerDeleteBehavior", - "action": "function $designerDeleteBehavior(id) { \n let search = $db.collections._Behavior.find({ '_id': id });\n let behavior = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n $db.collections._Behavior.remove({ '_id': id });\n \n if (behavior) {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been deleted');\n }\n}", - "useCoreAPI": true, - "core": true - }, - "h109eb1b4ed148fd": { - "_id": "h109eb1b4ed148fd", - "component": "channel", - "state": "$designerSync", - "action": "function $designerSync() { \n let designerWindow = this.require('admin').designerWindow(),\n system = null;\n\n this.require('admin').designerWindow(null);\n system = JSON.parse($db.exportSystem());\n designerWindow = this.require('admin').designerWindow(designerWindow);\n\n this.$appLoadSystem(system);\t\n}", - "useCoreAPI": true, - "core": true - }, - "w1a9961205712671": { - "_id": "w1a9961205712671", - "component": "db", - "state": "insert", - "action": "function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "j122701697c19935": { - "_id": "j122701697c19935", - "component": "db", - "state": "remove", - "action": "function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "t118f61f6d0127e4": { - "_id": "t118f61f6d0127e4", - "component": "db", - "state": "update", - "action": "function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "s1486715d9315862": { - "_id": "s1486715d9315862", - "component": "channel", - "state": "init", - "action": "function init(conf) { \n window.addEventListener('message', function message(event) {\n let data = null;\n try {\n data = JSON.parse(event.data);\n if (data &&\n typeof data.event !== 'undefined' &&\n typeof data.from !== 'undefined' &&\n typeof data.data !== 'undefined') {\n if (this.require('admin').designerWindow) {\n this.require('admin').designerWindow(event.source);\n }\n $db.collections._Message.insert(data);\n }\n } catch (e) {\n }\n }.bind(this), false);\t\n}", - "useCoreAPI": true, - "core": true - }, - "e10ba11978d122c5": { - "_id": "e10ba11978d122c5", - "component": "admin", - "state": "init", - "action": "function init(conf) { \n // for jquery compatibility in electron\n if (typeof global !== 'undefined' && typeof window !== 'undefined') {\n delete module;\n }\n}", - "useCoreAPI": false, - "core": true - }, - "i139a61d4aa1bea7": { - "_id": "i139a61d4aa1bea7", - "component": "logger", - "state": "info", - "action": "function info(message) { \n if (this.level() === 'info' || this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogInfo('[' + time + '] ' + message);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "r1c1841a98e1bc15": { - "_id": "r1c1841a98e1bc15", - "component": "logger", - "state": "debug", - "action": "function debug(message) { \n if (this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogDebug('[' + time + '] ' + message);\n }\t\n}", - "useCoreAPI": false, - "core": true - }, - "m1d30414ed912a2a": { - "_id": "m1d30414ed912a2a", - "component": "logger", - "state": "error", - "action": "function error(message) { \n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogError('[' + time + '] ' + message);\n}", - "useCoreAPI": false, - "core": true - }, - "d1d19f1ae9a12118": { - "_id": "d1d19f1ae9a12118", - "component": "logger", - "state": "warn", - "action": "function warn(message) { \n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogWarn('[' + time + '] ' + message);\n }\n}", - "useCoreAPI": false, - "core": true - }, - "a172ce13a3e1e8ff": { - "_id": "a172ce13a3e1e8ff", - "component": "channel", - "state": "$designerSetSystem", - "action": "function $designerSetSystem(system) { \n this.require('logger').level('info');\n\tthis.require('runtime').install(system);\n}", - "useCoreAPI": false, - "core": true - } - }, - "types": {}, - "components": { - "_Admin": { - "admin": { "_id": "admin", "_core": true, "designerWindow": null } - }, - "_Channel": { "channel": { "_id": "channel" } }, - "_Database": { "db": { "_id": "db" } }, - "_Logger": { "logger": { "_id": "logger", "level": "warn" } } - }, - "_id": "18ed81de331252c" -} +{"name":"mode-admin","master":false,"version":"1.0.0","description":"Enable connection to System Designer","schemas":{"1723516a30132ac":{"_name":"_Database","_inherit":["_Component"],"_core":true,"insert":"event","update":"event","remove":"event","_id":"1723516a30132ac"},"10374180581a41f":{"_id":"10374180581a41f","_name":"_Admin","_inherit":["_Component"],"_core":true,"designerWindow":"property"},"104ad1f48518376":{"_id":"104ad1f48518376","_name":"_Channel","_core":true,"$editorUpdateSystem":"event","$editorUpdateSchema":"event","$editorUpdateSchemaId":"event","$editorUpdateSchemaName":"event","$editorUpdateModel":"event","$editorUpdateModelId":"event","$editorUpdateType":"event","$editorDeleteType":"event","$editorUpdateBehavior":"event","$editorDeleteBehavior":"event","$editorUpdateComponent":"event","$editorUpdateComponentId":"event","$editorDeleteComponent":"event","$appLogDebug":"event","$appLogInfo":"event","$appLogWarn":"event","$appLogError":"event","$appLoadSystem":"event","$designerSync":"event","$designerCreateBehavior":"event","$designerCreateComponent":"event","$designerCreateType":"event","$designerCreateSchema":"event","$designerCreateModel":"event","$designerDeleteSchema":"event","$designerDeleteModel":"event","$designerDeleteType":"event","$designerDeleteBehavior":"event","$designerDeleteComponent":"event","$designerUpdateComponent":"event","$designerUpdateModel":"event","$designerUpdateBehavior":"event","$designerSetSystem":"event","$runtimeCreateComponent":"event","$runtimeDeleteComponent":"event","$runtimeUpdateComponent":"event","send":"event"},"1268f1dddd1fea7":{"_name":"_Logger","_core":true,"level":"property","debug":"method","info":"method","warn":"method","error":"method","_id":"1268f1dddd1fea7"}},"models":{"18a51169d7112d4":{"_name":"_Database","_core":true,"insert":{"params":[{"name":"event","type":"dbInsertEvent"}]},"update":{"params":[{"name":"event","type":"dbUpdateEvent"}]},"remove":{"params":[{"name":"event","type":"dbRemoveEvent"}]},"_id":"18a51169d7112d4"},"138a81fa1f16435":{"_id":"138a81fa1f16435","_name":"_Admin","_inherit":["_Component"],"_core":true,"designerWindow":{"type":"object","readOnly":false,"mandatory":false,"default":null}},"135c71078810af2":{"_id":"135c71078810af2","_name":"_Channel","_inherit":["_Component"],"_core":true,"$editorUpdateSchemaName":{"params":[{"name":"name","type":"string"},{"name":"id","type":"string"}]},"$designerSync":{},"$appLoadSystem":{"params":[{"name":"system","type":"object"}]},"$designerCreateBehavior":{"params":[{"name":"behavior","type":"object"}]},"$editorUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$designerUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$editorDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponentId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"},{"name":"collection","type":"string"}]},"$designerUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorUpdateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchemaId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteSchema":{"params":[{"name":"id","type":"string"}]},"$designerCreateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$designerUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModelId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteModel":{"params":[{"name":"id","type":"string"}]},"$editorUpdateSystem":{"params":[{"name":"id","type":"string"},{"name":"system","type":"object"}]},"$appLogDebug":{"params":[{"name":"message","type":"string"}]},"$appLogInfo":{"params":[{"name":"message","type":"string"}]},"$appLogWarn":{"params":[{"name":"message","type":"string"}]},"$appLogError":{"params":[{"name":"message","type":"string"}]},"$runtimeCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$runtimeDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$runtimeUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"field","type":"string"},{"name":"value","type":"any"}]},"send":{"params":[{"name":"message","type":"message"}]},"$designerSetSystem":{"params":[{"name":"system","type":"object","mandatory":false,"default":{}}]}},"16b9d1ac2216ffe":{"_id":"16b9d1ac2216ffe","_name":"_Logger","_core":true,"level":{"type":"log","readOnly":false,"mandatory":false,"default":"warn"},"debug":{"params":[{"name":"message","type":"any"}]},"info":{"params":[{"name":"message","type":"any"}]},"warn":{"params":[{"name":"message","type":"any"}]},"error":{"params":[{"name":"message","type":"any"}]}}},"behaviors":{"g198c91f8601d02f":{"_id":"g198c91f8601d02f","component":"channel","state":"send","action":"function send(message) { \n if (this.require('admin').designerWindow()) {\n this.require('admin').designerWindow().postMessage(JSON.stringify(message), '*');\n }\n}","useCoreAPI":false,"core":true},"h1b3891699319be4":{"_id":"h1b3891699319be4","component":"channel","state":"$designerCreateSchema","action":"function $designerCreateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been created');\n }\n}","useCoreAPI":false,"core":true},"w161ae196d51f585":{"_id":"w161ae196d51f585","component":"channel","state":"$editorUpdateSchema","action":"function $editorUpdateSchema(id, schema) { \n if (schema && schema._name) {\n this.require('logger').debug('analyzing ' + schema._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\n \n if (schema && schema._name) {\n this.require('logger').debug(schema._name + ' class has been updated');\n }\n}","useCoreAPI":false,"core":true},"x12449136a811be2":{"_id":"x12449136a811be2","component":"channel","state":"$designerDeleteSchema","action":"function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n \n this.require('logger').debug(modelName + ' class has been deleted');\n}","useCoreAPI":true,"core":true},"h103b01d9591bbb4":{"_id":"h103b01d9591bbb4","component":"channel","state":"$designerCreateModel","action":"function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"r12c4e1d6cf1cf0e":{"_id":"r12c4e1d6cf1cf0e","component":"channel","state":"$editorUpdateModel","action":"function $editorUpdateModel(id, model) { \n if (model && model._name) {\n this.require('logger').debug('analyzing ' + model._name + ' model...');\n }\n \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (model && model._name) {\n this.require('logger').debug(model._name + ' has been updated');\n }\n}","useCoreAPI":false,"core":true},"x1eb4c1d03b1ee34":{"_id":"x1eb4c1d03b1ee34","component":"channel","state":"$designerUpdateModel","action":"function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w1c68e1c7aa19326":{"_id":"w1c68e1c7aa19326","component":"channel","state":"$designerDeleteModel","action":"function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\n}","useCoreAPI":true,"core":true},"x1f6bc11b3816de0":{"_id":"x1f6bc11b3816de0","component":"channel","state":"$designerCreateType","action":"function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been created');\n }\n}","useCoreAPI":false,"core":true},"m1ff4f11d19164c0":{"_id":"m1ff4f11d19164c0","component":"channel","state":"$editorUpdateType","action":"function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type && type.name) {\n this.require('logger').debug(type.name + ' type has been updated');\n }\n}","useCoreAPI":false,"core":true},"u1e8bd17bdc15d6a":{"_id":"u1e8bd17bdc15d6a","component":"channel","state":"$editorDeleteType","action":"function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"k18a311f76f1ff2a":{"_id":"k18a311f76f1ff2a","component":"channel","state":"$designerDeleteType","action":"function $designerDeleteType(id) { \n let search = $db.collections._Type.find({ 'name': id });\n let type = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n \n if (type) {\n this.require('logger').debug(type.name + ' type has been deleted');\n }\n}","useCoreAPI":true,"core":true},"i1fe2e1f8fe1f3b7":{"_id":"i1fe2e1f8fe1f3b7","component":"channel","state":"$designerCreateComponent","action":"function $designerCreateComponent(collection, component) { \n if ($db.collections[collection]) {\n $db.collections[collection].insert(component);\t\n } else {\n if (component && component._id) {\n this.require('logger').debug('can not create \\'' + component._id + '\\' component: ' + collection +' model does not exit');\n }\n }\n}","useCoreAPI":true,"core":true},"e1cc381f58818dd4":{"_id":"e1cc381f58818dd4","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n if ($db.collections[collection]) {\n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n } else {\n this.require('logger').debug('can not update \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}","useCoreAPI":true,"core":true},"o1ed5a1768c181b2":{"_id":"o1ed5a1768c181b2","component":"channel","state":"$editorDeleteComponent","action":"function $editorDeleteComponent(id, collection) { \n if ($db.collections[collection]) {\n $db.collections[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}","useCoreAPI":true,"core":true},"t18fe213b0718b38":{"_id":"t18fe213b0718b38","component":"channel","state":"$designerDeleteComponent","action":"function $designerDeleteComponent(id, collection) { \n if ($db.collections[collection]) {\n $db.collections[collection].remove({ '_id': id });\t\n } else {\n this.require('logger').debug('can not delete \\'' + id + '\\' component: ' + collection +' model does not exit');\n }\n}","useCoreAPI":true,"core":true},"p1524e1d2c414a17":{"_id":"p1524e1d2c414a17","component":"channel","state":"$designerCreateBehavior","action":"function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n \n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been created');\n}","useCoreAPI":true,"core":true},"m154451abb8103f1":{"_id":"m154451abb8103f1","component":"channel","state":"$editorUpdateBehavior","action":"function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require('logger').debug(behavior.state + ' behavior of the system has been updated');\n this.require('logger').debug('restarting the system...');\n this.require(behavior.component).start();\n } else {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been updated');\n }\n }\telse {\n this.require('logger').debug('can not update ' + behavior.state + ' behavior (\\'' + behavior.component + '\\' component): the component does not exist');\n }\n}","useCoreAPI":false,"core":true},"q131b819d531053f":{"_id":"q131b819d531053f","component":"channel","state":"$editorDeleteBehavior","action":"function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h1214316cb61ea28":{"_id":"h1214316cb61ea28","component":"channel","state":"$designerDeleteBehavior","action":"function $designerDeleteBehavior(id) { \n let search = $db.collections._Behavior.find({ '_id': id });\n let behavior = search.length ? JSON.parse(JSON.stringify(search[0])) : null;\n \n $db.collections._Behavior.remove({ '_id': id });\n \n if (behavior) {\n this.require('logger').debug(behavior.state + ' behavior (\\'' + behavior.component + '\\' component) has been deleted');\n }\n}","useCoreAPI":true,"core":true},"h109eb1b4ed148fd":{"_id":"h109eb1b4ed148fd","component":"channel","state":"$designerSync","action":"function $designerSync() { \n let designerWindow = this.require('admin').designerWindow(),\n system = null;\n\n this.require('admin').designerWindow(null);\n system = JSON.parse($db.exportSystem());\n designerWindow = this.require('admin').designerWindow(designerWindow);\n\n this.$appLoadSystem(system);\t\n}","useCoreAPI":true,"core":true},"w1a9961205712671":{"_id":"w1a9961205712671","component":"db","state":"insert","action":"function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}","useCoreAPI":false,"core":true},"j122701697c19935":{"_id":"j122701697c19935","component":"db","state":"remove","action":"function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}","useCoreAPI":false,"core":true},"t118f61f6d0127e4":{"_id":"t118f61f6d0127e4","component":"db","state":"update","action":"function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}","useCoreAPI":false,"core":true},"s1486715d9315862":{"_id":"s1486715d9315862","component":"channel","state":"init","action":"function init(conf) { \n window.addEventListener('message', function message(event) {\n let data = null;\n try {\n data = JSON.parse(event.data);\n if (data &&\n typeof data.event !== 'undefined' &&\n typeof data.from !== 'undefined' &&\n typeof data.data !== 'undefined') {\n if (this.require('admin').designerWindow) {\n this.require('admin').designerWindow(event.source);\n }\n $db.collections._Message.insert(data);\n }\n } catch (e) {\n }\n }.bind(this), false);\t\n}","useCoreAPI":true,"core":true},"e10ba11978d122c5":{"_id":"e10ba11978d122c5","component":"admin","state":"init","action":"function init(conf) { \n // for jquery compatibility in electron\n if (typeof global !== 'undefined' && typeof window !== 'undefined') {\n delete module;\n }\n}","useCoreAPI":false,"core":true},"i139a61d4aa1bea7":{"_id":"i139a61d4aa1bea7","component":"logger","state":"info","action":"function info(message) { \n if (this.level() === 'info' || this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogInfo('[' + time + '] ' + message);\n }\t\n}","useCoreAPI":false,"core":true},"r1c1841a98e1bc15":{"_id":"r1c1841a98e1bc15","component":"logger","state":"debug","action":"function debug(message) { \n if (this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogDebug('[' + time + '] ' + message);\n }\t\n}","useCoreAPI":false,"core":true},"m1d30414ed912a2a":{"_id":"m1d30414ed912a2a","component":"logger","state":"error","action":"function error(message) { \n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogError('[' + time + '] ' + message);\n}","useCoreAPI":false,"core":true},"d1d19f1ae9a12118":{"_id":"d1d19f1ae9a12118","component":"logger","state":"warn","action":"function warn(message) { \n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\n let date = new Date(),\n time = date.toTimeString(),\n ms = date.getMilliseconds();\n\n time = time.split(' ')[0].trim();\n time = time.replace(':', 'h');\n time = time.replace(':', 'm');\n time = time.split('m')[0].trim();\n time = time + ':' + ms;\n \n this.require('channel').$appLogWarn('[' + time + '] ' + message);\n }\n}","useCoreAPI":false,"core":true},"a172ce13a3e1e8ff":{"_id":"a172ce13a3e1e8ff","component":"channel","state":"$designerSetSystem","action":"function $designerSetSystem(system) { \n this.require('logger').level('info');\n\tthis.require('runtime').install(system);\n}","useCoreAPI":false,"core":true}},"types":{},"components":{"_Admin":{"admin":{"_id":"admin","_core":true,"designerWindow":null}},"_Channel":{"channel":{"_id":"channel"}},"_Database":{"db":{"_id":"db"}},"_Logger":{"logger":{"_id":"logger","level":"warn"}}},"_id":"18ed81de331252c"} \ No newline at end of file diff --git a/extensions/mode-dev.json b/extensions/mode-dev.json index e9eda4e..5155149 100755 --- a/extensions/mode-dev.json +++ b/extensions/mode-dev.json @@ -1,21 +1 @@ -{ - "name": "mode-dev", - "master": false, - "version": "1.0.0", - "description": "Development mode", - "schemas": {}, - "models": {}, - "behaviors": { - "y1c59d1de591d81e": { - "_id": "y1c59d1de591d81e", - "component": "z1f9151698514d13", - "state": "start", - "action": "function start() {\n if (typeof document !== 'undefined') {\n runtime.require('logger').level('debug');\n \n document.addEventListener('dragenter', function dragenter(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function dragover(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function drop(e) {\n e.stopPropagation();\n e.preventDefault();\n let files = e.dataTransfer.files;\n let reader = new FileReader();\n let json = '';\n reader.onload = function onload(event) {\n json += event.target.result;\n };\n reader.onloadend = function onloadend() {\n try {\n let sys = JSON.parse(json);\n runtime.install(sys);\n runtime.require('logger').info('system ' + sys._id + ' has been installed.');\n } catch (e) {\n runtime.require('logger').warn('try to install an invalid system.');\n }\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n}", - "useCoreAPI": false, - "core": true - } - }, - "types": {}, - "components": {}, - "_id": "z1f9151698514d13" -} +{"name":"mode-dev","master":false,"version":"1.0.0","description":"Development mode","schemas":{},"models":{},"behaviors":{"y1c59d1de591d81e":{"_id":"y1c59d1de591d81e","component":"z1f9151698514d13","state":"start","action":"function start() {\n if (typeof document !== 'undefined') {\n runtime.require('logger').level('debug');\n \n document.addEventListener('dragenter', function dragenter(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function dragover(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function drop(e) {\n e.stopPropagation();\n e.preventDefault();\n let files = e.dataTransfer.files;\n let reader = new FileReader();\n let json = '';\n reader.onload = function onload(event) {\n json += event.target.result;\n };\n reader.onloadend = function onloadend() {\n try {\n let sys = JSON.parse(json);\n runtime.install(sys);\n runtime.require('logger').info('system ' + sys._id + ' has been installed.');\n } catch (e) {\n runtime.require('logger').warn('try to install an invalid system.');\n }\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n}","useCoreAPI":false,"core":true}},"types":{},"components":{},"_id":"z1f9151698514d13"} \ No newline at end of file diff --git a/extensions/storage.json b/extensions/storage.json index 664124f..9df4481 100755 --- a/extensions/storage.json +++ b/extensions/storage.json @@ -1,102 +1 @@ -{ - "name": "storage", - "master": false, - "version": "1.0.0", - "description": "Storage", - "schemas": { - "12fa8181ce127a0": { - "_id": "12fa8181ce127a0", - "_name": "_Storage", - "_inherit": ["_Component"], - "_core": true, - "store": "property", - "get": "method", - "set": "method", - "remove": "method", - "clear": "method", - "changed": "event" - } - }, - "models": { - "1f4141671514c2c": { - "_id": "1f4141671514c2c", - "_name": "_Storage", - "get": { - "params": [ - { "name": "key", "type": "string", "mandatory": true, "default": "" } - ] - }, - "set": { - "params": [ - { "name": "key", "type": "string", "mandatory": true, "default": "" }, - { "name": "value", "type": "any", "mandatory": true, "default": null } - ] - }, - "changed": { - "params": [ - { "name": "obj", "type": "object", "mandatory": true, "default": {} } - ] - }, - "clear": {}, - "remove": { - "params": [ - { "name": "key", "type": "string", "mandatory": true, "default": "" } - ] - }, - "_core": true, - "store": { - "type": "object", - "readOnly": false, - "mandatory": false, - "default": {} - } - } - }, - "behaviors": { - "1ca0f1020412d4f": { - "_id": "1ca0f1020412d4f", - "component": "_Storage", - "state": "get", - "action": "function get(key) {\n let result = null;\n\n if (typeof this.store()[key]) {\n result = this.store()[key];\n }\n return result;\n}", - "useCoreAPI": false, - "core": true - }, - "16764100d51b5f8": { - "_id": "16764100d51b5f8", - "component": "_Storage", - "state": "set", - "action": "function set(key, value) {\n let store = this.store(),\n item = {};\n\n store[key] = value;\n this.store(store);\n\n item[key] = JSON.stringify(value);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.setItem(key, JSON.stringify(value));\n break;\n default:\n break;\n }\n } catch (e) { }\n}", - "useCoreAPI": false, - "core": true - }, - "134b616b1016f60": { - "_id": "134b616b1016f60", - "component": "_Storage", - "state": "clear", - "action": "function clear() {\n this.store({});\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.clear();\n break;\n default:\n break;\n }\n } catch (e) { }\n}", - "useCoreAPI": false, - "core": true - }, - "14c7f1a8431b3d5": { - "_id": "14c7f1a8431b3d5", - "component": "_Storage", - "state": "init", - "action": "function init(conf) {\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n // init \n let keys = Object.keys(localStorage),\n store = {},\n i = 0,\n length = 0;\n\n length = keys.length;\n for (i = 0; i < length; i++) {\n try {\n store[keys[i]] = JSON.parse(localStorage[keys[i]]);\n } catch (e) { }\n }\n this.store(store);\n\n // event\n window.addEventListener('storage', function (e) {\n let obj = {},\n store = this.store();\n\n try {\n store[e.key] = JSON.parse(e.newValue);\n this.store(store);\n\n obj[e.key] = {};\n obj[e.key].oldValue = JSON.parse(e.oldValue);\n obj[e.key].newValue = JSON.parse(e.newValue);\n\n this.changed(obj);\n } catch (e) { }\n }.bind(this));\n break;\n default:\n break;\n }\n } catch (e) { }\n}", - "useCoreAPI": false, - "core": true - }, - "1a4921ac7112bd4": { - "_id": "1a4921ac7112bd4", - "component": "_Storage", - "state": "remove", - "action": "function remove(key) {\n let store = this.store();\n\n delete store[key];\n this.store(store);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.removeItem(key);\n break;\n default:\n break;\n }\n } catch (e) { }\n}", - "useCoreAPI": false, - "core": true - } - }, - "types": {}, - "components": { - "_Storage": { "storage": { "_id": "storage", "_core": true } } - }, - "_id": "15de81d295153db" -} +{"name":"storage","master":false,"version":"1.0.0","description":"Storage","schemas":{"12fa8181ce127a0":{"_id":"12fa8181ce127a0","_name":"_Storage","_inherit":["_Component"],"_core":true,"store":"property","get":"method","set":"method","remove":"method","clear":"method","changed":"event"}},"models":{"1f4141671514c2c":{"_id":"1f4141671514c2c","_name":"_Storage","get":{"params":[{"name":"key","type":"string","mandatory":true,"default":""}]},"set":{"params":[{"name":"key","type":"string","mandatory":true,"default":""},{"name":"value","type":"any","mandatory":true,"default":null}]},"changed":{"params":[{"name":"obj","type":"object","mandatory":true,"default":{}}]},"clear":{},"remove":{"params":[{"name":"key","type":"string","mandatory":true,"default":""}]},"_core":true,"store":{"type":"object","readOnly":false,"mandatory":false,"default":{}}}},"behaviors":{"1ca0f1020412d4f":{"_id":"1ca0f1020412d4f","component":"_Storage","state":"get","action":"function get(key) {\n let result = null;\n\n if (typeof this.store()[key]) {\n result = this.store()[key];\n }\n return result;\n}","useCoreAPI":false,"core":true},"16764100d51b5f8":{"_id":"16764100d51b5f8","component":"_Storage","state":"set","action":"function set(key, value) {\n let store = this.store(),\n item = {};\n\n store[key] = value;\n this.store(store);\n\n item[key] = JSON.stringify(value);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.setItem(key, JSON.stringify(value));\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true},"134b616b1016f60":{"_id":"134b616b1016f60","component":"_Storage","state":"clear","action":"function clear() {\n this.store({});\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.clear();\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true},"14c7f1a8431b3d5":{"_id":"14c7f1a8431b3d5","component":"_Storage","state":"init","action":"function init(conf) {\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n // init \n let keys = Object.keys(localStorage),\n store = {},\n i = 0,\n length = 0;\n\n length = keys.length;\n for (i = 0; i < length; i++) {\n try {\n store[keys[i]] = JSON.parse(localStorage[keys[i]]);\n } catch (e) { }\n }\n this.store(store);\n\n // event\n window.addEventListener('storage', function (e) {\n let obj = {},\n store = this.store();\n\n try {\n store[e.key] = JSON.parse(e.newValue);\n this.store(store);\n\n obj[e.key] = {};\n obj[e.key].oldValue = JSON.parse(e.oldValue);\n obj[e.key].newValue = JSON.parse(e.newValue);\n\n this.changed(obj);\n } catch (e) { }\n }.bind(this));\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true},"1a4921ac7112bd4":{"_id":"1a4921ac7112bd4","component":"_Storage","state":"remove","action":"function remove(key) {\n let store = this.store();\n\n delete store[key];\n this.store(store);\n\n try {\n switch (true) {\n case typeof localStorage !== 'undefined':\n localStorage.removeItem(key);\n break;\n default:\n break;\n }\n } catch (e) { }\n}","useCoreAPI":false,"core":true}},"types":{},"components":{"_Storage":{"storage":{"_id":"storage","_core":true}}},"_id":"15de81d295153db"} \ No newline at end of file diff --git a/src/system.js b/src/system.js index f353523..199f992 100644 --- a/src/system.js +++ b/src/system.js @@ -866,7 +866,7 @@ export default { component: '_OSGi', state: 'install', action: - "function install(url, async) {\n let importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\n if (url.indexOf('.json') !== -1) {\n if (typeof global.process.env.PWD === 'undefined') {\n system = require(global.process.cwd() + '/' + url);\n } else {\n system = require(global.process.env.PWD + '/' + url);\n }\n } else {\n system = require(url);\n }\n systemId = $db.importSystem(system);\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n let sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n }\n return result;\n}", + "function install(url, async) {\n let importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n let sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n return result;\n}", useCoreAPI: true, core: true, }, diff --git a/src/system/system-runtime.json b/src/system/system-runtime.json index aeeb0d6..574cab3 100644 --- a/src/system/system-runtime.json +++ b/src/system/system-runtime.json @@ -630,7 +630,7 @@ "_id": "1ef951f1411b895", "component": "_OSGi", "state": "install", - "action": "function install(url, async) {\n let importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n if (typeof global !== 'undefined' && typeof window === 'undefined') {\n if (url.indexOf('.json') !== -1) {\n if (typeof global.process.env.PWD === 'undefined') {\n system = require(global.process.cwd() + '/' + url);\n } else {\n system = require(global.process.env.PWD + '/' + url);\n }\n } else {\n system = require(url);\n }\n systemId = $db.importSystem(system);\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n let sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n }\n return result;\n}", + "action": "function install(url, async) {\n let importedSystem = null,\n system = {},\n systemId = '',\n callbackLoad = null,\n xhr = null,\n result = '',\n channel = $component.get('channel');\n\n if (typeof url === 'object') {\n importedSystem = url;\n } else {\n if (url.indexOf('{') === 0) {\n importedSystem = JSON.parse(url);\n }\n }\n\n if (importedSystem) {\n systemId = $db.importSystem(importedSystem);\n if (systemId) {\n system = this.require(systemId);\n\n if (typeof url === 'string') {\n system.location(url);\n }\n system.state('installed');\n channel.$systemInstalled(systemId);\n system.state('resolved');\n channel.$systemResolved(systemId);\n\n result = systemId;\n }\n } else {\n xhr = new XMLHttpRequest();\n callbackLoad = function callbackLoad(system, url) {\n let sysId = $db.importSystem(system),\n sys = $component.get(sysId),\n channel = $component.get('channel');\n\n if (typeof url === 'string') {\n sys.location(url);\n }\n sys.state('installed');\n channel.$systemInstalled(sysId);\n sys.state('resolved');\n channel.$systemResolved(sysId);\n\n result = sysId;\n };\n\n if (async) {\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200 || xhr.status === 0) {\n if (xhr.response !== '') {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n };\n xhr.send(null);\n } else {\n xhr.open('GET', url, false);\n xhr.send(null);\n if (xhr.status === 200 || xhr.status === 0) {\n callbackLoad(JSON.parse(xhr.response), url);\n }\n }\n }\n return result;\n}", "useCoreAPI": true, "core": true }, From 6a6e5d02c4e3b1d1ac3d06b2592dbcdf2a5ffa35 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 12:38:03 +0100 Subject: [PATCH 05/12] chore: bump 6.0.0-beta.2 --- dist/system-runtime.js | 2 +- dist/system-runtime.js.map | 2 +- package-lock.json | 9617 -------------------------------- package.json | 4 +- src/system.js | 6 +- src/system/system-runtime.json | 6 +- 6 files changed, 10 insertions(+), 9627 deletions(-) delete mode 100644 package-lock.json diff --git a/dist/system-runtime.js b/dist/system-runtime.js index 5660afc..3ef3249 100644 --- a/dist/system-runtime.js +++ b/dist/system-runtime.js @@ -17,5 +17,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=R(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"5.1.0\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"5.1.0\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"5.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,Y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GTqC,QAAW,CACV4f,OAAU,CACTjiB,IAAO,SACPmB,MAAS,SAGX+gB,WAAc,CACbC,UAAa,CACZniB,IAAO,cAGT6I,SAAY,CACXuZ,QAAW,CACVpiB,IAAO,UACP2e,QAAW,UAGb0D,SAAY,CACXC,QAAW,CACVtiB,IAAO,aAIVA,IAAO,oBDh0CRiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file +{"version":3,"file":"system-runtime.js","sources":["../src/mson.js","../src/log.js","../src/helper.js","../src/metamodel.js","../src/behavior.js","../src/state.js","../src/history.js","../src/workflow.js","../src/component.js","../src/db.js","../src/runtime.js","../src/system.js"],"sourcesContent":["/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module mson\n * @description This module contains all the mson definition.\n */\n\nconst ID = '_id'\nconst NAME = '_name'\nconst DESCRIPTION = '_description'\nconst INHERIT = '_inherit'\nconst CLASS = '_class'\nconst CORE = '_core'\n\nconst INTERNAL_NAMES = [\n '_id',\n '_name',\n '_inherit',\n '_description',\n '_class',\n '_core',\n]\n\nconst PROPERTY_TYPE = 'property'\nconst COLLECTION_TYPE = 'collection'\nconst LINK_TYPE = 'link'\nconst METHOD_TYPE = 'method'\nconst EVENT_TYPE = 'event'\n\nconst INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']\n\nconst DEFAULT_TYPES = [\n 'boolean',\n 'string',\n 'number',\n 'object',\n 'function',\n 'array',\n 'date',\n 'any',\n]\n\nconst SCHEMA_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n default: ['_Component'],\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst MODEL_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst TYPE_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n name: {\n type: 'string',\n mandatory: true,\n },\n type: {\n type: 'string',\n mandatory: true,\n },\n schema: {\n type: 'object',\n mandatory: false,\n },\n value: {\n type: ['any'],\n mandatory: false,\n },\n core: {\n type: 'boolean',\n mandatory: false,\n },\n description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nexport default {\n ID,\n NAME,\n DESCRIPTION,\n INHERIT,\n CLASS,\n CORE,\n INTERNAL_NAMES,\n PROPERTY_TYPE,\n COLLECTION_TYPE,\n LINK_TYPE,\n METHOD_TYPE,\n EVENT_TYPE,\n INTERNAL_TYPES,\n DEFAULT_TYPES,\n SCHEMA_DEFINITION,\n MODEL_DEFINITION,\n TYPE_DEFINITION,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module log\n * @requires metamodel\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions that write a log\n */\n\nimport $metamodel from './metamodel.js'\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet currentLevel = 'warn' // eslint-disable-line no-unused-vars\nlet loggerRef = null\nlet fakeLoggerRef = {\n currentLevel: 'warn',\n level: function debug(levelName) {\n if (levelName) {\n this.currentLevel = levelName\n }\n return this.currentLevel\n },\n debug: function debug(message) {\n if (this.currentLevel === 'debug') {\n console.log('runtime: ' + message)\n }\n },\n info: function info(message) {\n if (this.currentLevel === 'info' || this.currentLevel === 'debug') {\n console.info('runtime: ' + message)\n }\n },\n warn: function warning(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug'\n ) {\n console.warn('runtime: ' + message)\n }\n },\n error: function error(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug' ||\n this.currentLevel === 'error'\n ) {\n console.error('runtime: ' + message)\n }\n },\n}\n\n/**\n * @method getLogger\n * @return {_Logger} _Logger instance\n * @private\n * @description Get the _Logger instance\n */\nfunction getLogger() {\n let loggerId = ''\n let loggers = []\n let result = null\n\n if (!$metamodel.getModel('_Logger')) {\n result = fakeLoggerRef\n } else {\n loggers = $db.collections._Logger.find()\n if (loggers.length) {\n loggerId = loggers[0][$mson.ID]\n\n if ($component.get(loggerId)) {\n loggerRef = $component.get(loggerId)\n result = loggerRef\n } else {\n result = fakeLoggerRef\n }\n } else {\n result = fakeLoggerRef\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method level\n * @param {String} levelName name of the level\n * @description Set the level of the log\n */\nfunction level(levelName) {\n currentLevel = levelName\n}\n\n/**\n * @method unknownProperty\n * @param {String} propertyName the name of the property\n * @param {Object} schema the schema definition\n * @description A property of a schema is unknown\n */\nfunction unknownProperty(propertyName, schema) {\n let message = ''\n\n if (schema[$mson.NAME]) {\n message =\n \"unknown property '\" +\n propertyName +\n \"' for the definition of '\" +\n schema[$mson.NAME] +\n \"'\"\n } else {\n message = \"unknown property '\" + propertyName + \"' for a model\"\n }\n\n getLogger().warn(message)\n}\n\n/**\n * @method invalidPropertyType\n * @param {String} propertyName name of the peropety\n * @param {String} type the type defined by the schema\n * @param {String} property the property\n * @description Invalid type for a property\n */\nfunction invalidPropertyType(propertyName, type, property) {\n let realType =\n property && property.constructor\n ? property.constructor.name\n : typeof property\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidEnumValue\n * @param {Object} value the value\n * @param {String} type the type defined by the schema\n * @description Invalid value for type enum\n */\nfunction invalidEnumValue(value, type) {\n getLogger().warn(\n \"'\" + value + \"' is an invalid value for the type enum '\" + type + \"'\"\n )\n}\n\n/**\n * @method invalidClassName\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidClassName(componentId, type, constructorName) {\n getLogger().warn(\n \"invalid component '\" +\n componentId +\n \"' for a collection: expected a component of class '\" +\n type +\n \"' instead of '\" +\n constructorName +\n \"'\"\n )\n}\n\n/**\n * @method missingProperty\n * @param {String} propertyName name of the property\n * @description Missing a property\n */\nfunction missingProperty(propertyName) {\n getLogger().warn(\"property '\" + propertyName + \"' is missing\")\n}\n\n/**\n * @method missingImplementation\n * @param {String} name name of the missing schema\n * @description A class definition is missing\n */\nfunction missingImplementation(name) {\n getLogger().warn(\"schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method invalidTypeImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Invalid type for a property of a class definition\n */\nfunction invalidTypeImp(property, className) {\n getLogger().error(\n \"the property '\" + property + \"' of \" + className + ' model is invalid'\n )\n}\n\n/**\n * @method missingPropertyImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Missing a property for a class definition\n */\nfunction missingPropertyImp(property, className) {\n getLogger().warn(\n \"missing property '\" + property + \"' in the model '\" + className + \"'\"\n )\n}\n\n/**\n * @method unknownPropertyImp\n * @param {String} property a property\n * @param {Object} schema a schema\n * @description Unkown property for a class definition\n */\nfunction unknownPropertyImp(property, schema) {\n getLogger().error(\n \"the model '\" + schema + \"' has an unknown property '\" + property + \"'\"\n )\n}\n\n/**\n * @method invalidTypeDefinition\n * @param {String} name a type definition\n * @description Try to add an invalid type\n */\nfunction invalidTypeDefinition(name) {\n getLogger().warn(\"the type '\" + name + \"' is not valid\")\n}\n\n/**\n * @method invalidPropertyName\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type type defined by the schema\n * @description Invalid property name\n */\nfunction invalidPropertyName(id, className, propertyName, propertyValue, type) {\n let classInfo = ''\n let realType = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n if (typeof type === 'string') {\n realType =\n propertyValue && propertyValue.constructor\n ? propertyValue.constructor.name\n : typeof propertyValue\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n realType = type && type.constructor ? type.constructor.name : typeof type\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n classInfo +\n \": expected type 'string' instead of type '\" +\n realType +\n \"'\"\n )\n }\n}\n\n/**\n * @method readOnlyProperty\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @description Trying to set a read-only property\n */\nfunction readOnlyProperty(id, className, propertyName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"can not set read-only property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidDocumentOnDbInsert\n * @param {String} doc a document\n * @param {String} collectionName the name of the collection\n * @description Invalid document on a System Runtime database insert operation\n */\nfunction invalidDocumentOnDbInsert(doc, collectionName) {\n getLogger().warn(\n \"invalid document '\" +\n JSON.stringify(doc).replace(/,/g, ', ') +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidPropertyTypeOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} id id of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type expected type defined by the schema\n * @description Invalid property on a System Runtime database update operation\n */\nfunction invalidPropertyTypeOnDbUpdate(\n collectionName,\n id,\n propertyName,\n propertyValue,\n type\n) {\n getLogger().warn(\n \"invalid type for the property '\" +\n propertyName +\n \"' of the document '\" +\n id +\n \"' (\" +\n collectionName +\n \" collection) with the value '\" +\n JSON.stringify(propertyValue) +\n \"': expected type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownPropertyOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Unkonw property on a System Runtime database update operation\n */\nfunction unknownPropertyOnDbUpdate(propertyName, collectionName, id) {\n getLogger().warn(\n \"unknown property '\" +\n propertyName +\n \"' for document '\" +\n id +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method unknownMethod\n * @param {String} classId id of the class\n * @param {String} methodName name of the method\n * @description Call an unknown method of a class\n */\nfunction unknownMethod(classId, methodName) {\n getLogger().warn(\n \"try to call an unknown action '\" +\n methodName +\n \"' for the class '\" +\n classId +\n \"'\"\n )\n}\n\n/**\n * @method invalidCollectionName\n * @param {String} name name of the collection\n * @description Try to create an invalid DatabaseCollection\n */\nfunction invalidCollectionName(name) {\n getLogger().warn(\n \"invalid name for the collection '\" +\n name +\n \"': there is no schema '\" +\n name +\n \"'\"\n )\n}\n\n/**\n * @method invalidResultType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name ot the method\n * @param {String} expectedType expected type\n * @param {String} type current type\n * @description Invalid type result of a method\n */\nfunction invalidResultType(id, className, methodName, expectedType, type) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid type for the result of action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n expectedType +\n \"' instead of type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownComponent\n * @param {String} id id of the class\n * @param {String} componentId id of the component\n * @description Unknown class\n */\nfunction unknownComponent(className, componentId) {\n getLogger().warn(\n \"unkown class name '\" + className + \"' for component '\" + componentId + \"'\"\n )\n}\n\n/**\n * @method invalidParamNumber\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a method\n */\nfunction invalidParamNumber(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid number of parameters when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidParamType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @param {String} paramName name of the parameter\n * @description Invalid type parameters for a method\n */\nfunction invalidParamType(id, className, methodName, paramName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n if (paramName !== undefined) {\n getLogger().warn(\n \"invalid type for the parameter '\" +\n paramName +\n \"' when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n } else {\n getLogger().warn(\n \"invalid type for a parameter when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n }\n}\n\n/**\n * @method behaviorNotUnique\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Add a more than one behavior to a state\n */\nfunction behaviorNotUnique(id, stateName) {\n getLogger().warn(\n \"try to add more than one action for the state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOn\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Can not add a behavior with an invalid state\n */\nfunction invalidStateOn(id, stateName) {\n getLogger().warn(\n \"try to add an action to an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOff\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description The call to a remove state of the behavior module is invalid\n */\nfunction invalidStateOff(id, stateName) {\n getLogger().warn(\n \"try to remove an action from an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method masterSystemNotFound\n * @description The master system is not found\n */\nfunction masterSystemNotFound() {\n getLogger().warn('can not export the database because no system was defined')\n}\n\n/**\n * @method invalidType\n * @param {String} name name of the type\n * @param {String} value value of the type\n * @param {String} typeName expected type defined by the schema\n * @description Invalid type\n */\nfunction invalidType(name, value, typeName) {\n let realType =\n name && value.constructor ? value.constructor.name : typeof value\n\n getLogger().warn(\n \"invalid value for property '\" +\n name +\n \"': expected type '\" +\n typeName +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidConfiguration\n * @param {Object} obj an object\n * @param {String} type expected type for the configuration\n * @description Invalid class name\n */\nfunction invalidConfiguration(obj, type) {\n getLogger().warn(\n \"invalid type for '\" + JSON.stringify(obj) + \"': expected '\" + type + \"'\"\n )\n}\n\n/**\n * @method unknownType\n * @param {String} value value\n * @description Unknown type\n */\nfunction unknownType(value) {\n getLogger().warn(\"unknown type for value '\" + JSON.stringify(value) + \"'\")\n}\n\n/**\n * @method unknownPath\n * @param {String} path path\n * @param {String} path subpath\n * @description Unknown subpath in a path\n */\nfunction unknownPath(path, subpath) {\n getLogger().warn(\n \"the path '\" + path + \"' has an unkown subpath '\" + subpath + \"'\"\n )\n}\n\n/**\n * @method canNotYetValidate\n * @param {String} id id of the component\n * @param {String} className name of the class\n * @description A component has not been alreay validated\n */\nfunction canNotYetValidate(id, className) {\n getLogger().debug(\n \"can not yet validate if the document '\" +\n id +\n \"' is compliant with \" +\n className +\n ' model'\n )\n}\n\n/**\n * @method invalidChannelEvent\n * @param {String} message message send\n * @param {String} eventName name of the event\n * @param {String} type expected type\n * @description A message send by the channel is invalid\n */\nfunction invalidChannelEvent(message, eventName, type) {\n getLogger().warn(\n \"invalid type for the message '\" +\n JSON.stringify(message) +\n \"': expected type '\" +\n type +\n \"' for event '\" +\n eventName +\n \"'\"\n )\n}\n\n/**\n * @method invalidParamNumberMethodOn\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a behavior add with 'on' method\n */\nfunction invalidParamNumberMethodOn(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"invalid number of parameters when adding an action for the state '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method updateUuid\n * @param {String} currentId id of the component\n * @param {String} newId of the component\n * @param {Boolean} alreadyUsed newId already used\n * @description Change the id of a component\n */\nfunction updateUuid(currentId, newId, alreadyUsed) {\n if (alreadyUsed) {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"' that is already used\"\n )\n } else {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"'\"\n )\n }\n}\n\n/**\n * @method invalidUseOfComponent\n * @param {String} id id of the component\n * @description Try to change the state of a component that has been destroyed\n */\nfunction invalidUseOfComponent(id) {\n getLogger().warn(\n \"try to change the state of the destroyed component '\" + id + \"'\"\n )\n}\n\n/**\n * @method invalidSchema\n * @param {String} name name of the schema\n * @description Try to add an invalid schema\n */\nfunction invalidSchema(name) {\n getLogger().warn(\n \"the schema '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidModel\n * @param {String} name name of the model\n * @description Try to add an invalid model\n */\nfunction invalidModel(name) {\n getLogger().warn(\n \"the model '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidParameters\n * @param {String} classId class name of the component\n * @param {String} document document\n * @description Invalid parameters set when creating an instance of a class\n */\nfunction invalidParameters(classId, document) {\n let id = document && document._id ? document._id : ''\n\n getLogger().warn(\n \"the parameters for creating '\" +\n id +\n \"' component (\" +\n classId +\n ' model) are not compliant with the model'\n )\n}\n\n/**\n * @method destroyedComponentCall\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Try to get the property of a destroyed component\n */\nfunction destroyedComponentCall(propertyName, id) {\n getLogger().warn(\n \"trying to get the property '\" +\n propertyName +\n \"' on the destroyed component '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidConctructorParameters\n * @param {String} object configuration\n * @param {String} name schema name\n * @description Invalid parameter type when creating an instance of a class\n */\nfunction invalidConctructorParameters(object, name) {\n getLogger().warn(\n \"the constructor parameter '\" +\n JSON.stringify(object).replace(/,/g, ', ') +\n \"' for creating a component of class '\" +\n name +\n \"' is not an object\"\n )\n}\n\n/**\n * @method unknownModel\n * @param {String} classId id of the class\n * @description Get the information of an unkown model\n */\nfunction unknownModel(classId) {\n getLogger().warn(\"the model '\" + classId + \"' does not exist\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema\n * @description A schema is missing\n */\nfunction missingSchema(name) {\n getLogger().warn(\"the schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema where the cyclic dependency was found\n * @description A cyclic dependency was found\n */\nfunction cyclicDependency(name) {\n if (name) {\n getLogger().error(\n \"a cyclic inheritance dependency with the schema '\" +\n name +\n \"’ has been found, please check the '_inherit' property of this schema\"\n )\n } else {\n getLogger().error(\n \"a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas\"\n )\n }\n}\n\n/**\n * @method invalidEnumType\n * @param {Object} value the value\n * @param {String} typeName name of the type\n * @param {String} type typeName of the type\n * @description Invalid type for a type enum\n */\nfunction invalidEnumType(value, typeName, type) {\n let realType = ''\n\n if (typeof type !== 'undefined' && type !== typeof value) {\n realType =\n value && value.constructor ? value.constructor.name : typeof value\n getLogger().warn(\n \"invalid type for the type '\" +\n typeName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n getLogger().warn(\"invalid type for the type '\" + typeName + \"'\")\n }\n}\n\n/**\n * @method loadSchema\n * @param {String} name name of the schema\n * @description Load schema\n */\nfunction loadSchema(name) {\n getLogger().debug(\"load schema '\" + name + \"'\")\n}\n\n/**\n * @method loadModel\n * @param {String} name name of the model\n * @description Load model\n */\nfunction loadModel(name) {\n getLogger().debug(\"load model '\" + name + \"'\")\n}\n\n/**\n * @method loadType\n * @param {String} name name of the type\n * @description Load type\n */\nfunction loadType(name) {\n getLogger().debug(\"load type '\" + name + \"'\")\n}\n\n/**\n * @method generatingSchema\n * @param {String} name name of the schema\n * @description Generate schema\n */\nfunction generatingSchema(name) {\n getLogger().debug('generating ' + name + ' schema ...')\n}\n\n/**\n * @method checkModel\n * @param {String} name name of the model\n * @description Check model\n */\nfunction checkModel(name) {\n getLogger().debug('analyzing ' + name + ' model...')\n}\n\n/**\n * @method createClass\n * @param {String} name name of the class\n * @description Create class\n */\nfunction createClass(name) {\n getLogger().debug(name + ' class has been created')\n}\n\n/**\n * @method initDb\n * @description Init the database\n */\nfunction initDb() {\n getLogger().debug('initializing data store...')\n}\n\n/**\n * @method actionInvokeError\n * @param {String} state state\n * @param {String} id component id\n * @param {String} className component class name\n * @param {String} message\n * @description An error happened when invoking a behavior\n */\nfunction actionInvokeError(state, id, className, message) {\n if (className !== 'Function') {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"' (\" +\n className +\n ' class): ' +\n message\n )\n } else {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"': \" +\n message\n )\n }\n}\n\n/**\n * @method invalidSchemaPropertyName\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaPropertyName(name, propName) {\n getLogger().warn(\n \"invalid name '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': a property name can not begin with '_'\"\n )\n}\n\n/**\n * @method invalidSchemaProperty\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaProperty(name, propName) {\n getLogger().warn(\n \"invalid property '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': only 'property', 'link', 'collection', 'method' and 'event' are allowed\"\n )\n}\n\n/**\n * @method invalidPropertyFormat\n * @param {String} obj definition of a property\n * @description Invalid format for the definition of a property\n */\nfunction invalidPropertyFormat(obj) {\n getLogger().warn(\n \"invalid format for a definition of a property: '\" +\n obj +\n \"' is not an object\"\n )\n}\n\n/**\n * @method invalidState\n * @param {String} model name of the model\n * @param {String} state invalid state\n * @description Invalid state\n */\nfunction invalidState(model, state) {\n getLogger().warn(\n \"invalid state '\" + state + \"' for the model '\" + model + \"'\"\n )\n}\n\n/**\n * @method unknownContext\n * @param {String} className name of the class\n * @param {String} methodName name of the method\n * @description Invoke a method class without a context\n */\nfunction unknownContext(className, methodName) {\n getLogger().warn(\n \"invoke the action '\" +\n methodName +\n \"' on the class '\" +\n className +\n \"' without a valid context\"\n )\n}\n\n/**\n * @method historyDocumentInserted\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} document\n * @description Created document from history\n */\nfunction historyDocumentInserted(id, collectionName, doc) {\n getLogger().debug(\n \"Created component of id '\" +\n id +\n \"' ('\" +\n collectionName +\n \" collection) with document '\" +\n doc +\n \"'\"\n )\n}\n\n/**\n * @method historyDocumentRemoved\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @description Removed document from history\n */\nfunction historyDocumentRemoved(id, collectionName) {\n getLogger().debug(\n \"Destroyed component of id '\" + id + \"' (\" + collectionName + ' collection)'\n )\n}\n\n/**\n * @method historyDocumentUpdated\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} fieldName field name of the component\n * @param {String} value value of the field\n * @description Updated document from history\n */\nfunction historyDocumentUpdated(id, collectionName, fieldName, value) {\n getLogger().debug(\n \"Updated field '\" +\n fieldName +\n \"' of component of id '\" +\n id +\n \"' with value '\" +\n value +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidCollectionItem\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidCollectionItem(\n id,\n className,\n propertyName,\n propertyValue,\n type\n) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' for all items of the collection '\" +\n JSON.stringify(propertyValue) +\n \"'\"\n )\n}\n\nexport default {\n level,\n unknownProperty,\n invalidPropertyType,\n invalidEnumValue,\n invalidClassName,\n missingProperty,\n missingImplementation,\n invalidTypeImp,\n missingPropertyImp,\n unknownPropertyImp,\n invalidTypeDefinition,\n invalidPropertyName,\n readOnlyProperty,\n invalidDocumentOnDbInsert,\n invalidPropertyTypeOnDbUpdate,\n unknownPropertyOnDbUpdate,\n unknownMethod,\n invalidCollectionName,\n invalidResultType,\n unknownComponent,\n invalidParamNumber,\n invalidParamType,\n behaviorNotUnique,\n invalidStateOn,\n invalidStateOff,\n masterSystemNotFound,\n invalidType,\n invalidConfiguration,\n unknownType,\n unknownPath,\n canNotYetValidate,\n invalidChannelEvent,\n invalidParamNumberMethodOn,\n updateUuid,\n invalidUseOfComponent,\n invalidSchema,\n invalidModel,\n invalidParameters,\n destroyedComponentCall,\n invalidConctructorParameters,\n unknownModel,\n missingSchema,\n cyclicDependency,\n invalidEnumType,\n loadSchema,\n loadModel,\n loadType,\n generatingSchema,\n checkModel,\n createClass,\n initDb,\n actionInvokeError,\n invalidSchemaPropertyName,\n invalidSchemaProperty,\n invalidPropertyFormat,\n invalidState,\n unknownContext,\n historyDocumentInserted,\n historyDocumentRemoved,\n historyDocumentUpdated,\n invalidCollectionItem,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module helper\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions used by all the modules\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private property */\n\nlet runtimeRef = null\n\n/* Public method */\n\n/**\n * @method isRuntime\n * @returns {Boolean} true if a System Runtime instance exist\n * @description Check if a System Runtime instance exists\n */\nfunction isRuntime() {\n let result = false\n\n if ($db.collections._Runtime && $db.collections._Runtime.find().length) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method getRuntime\n * @returns {_Runtime} System Runtime instance\n * @description Get the System Runtime instance\n */\nfunction getRuntime() {\n let runtimeId = ''\n let search = $db.collections._Runtime.find()\n\n if (!runtimeRef && search[0]) {\n runtimeId = search[0][$mson.ID]\n runtimeRef = $component.get(runtimeId)\n }\n\n return runtimeRef\n}\n\n/**\n * @method isOnNode\n * @returns {Boolean} true if a System Runtime is running on node\n * @description Check if a System Runtime is running on node\n */\nfunction isOnNode() {\n let result = false\n\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n result = true\n }\n\n return result\n}\n\n/**\n * @method generateId\n * @returns {String} a uuid\n * @description Generate a uuid\n */\nfunction generateId() {\n // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n function gen() {\n return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (Math.random() * 16) | 0\n let v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n }\n\n // force the uuid to start with a letter\n function getPrefix() {\n let validPrefix = 'abcdef'\n return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length))\n }\n\n return getPrefix() + gen()\n}\n\nexport default {\n isRuntime,\n getRuntime,\n isOnNode,\n generateId,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module metamodel\n * @requires db\n * @requires log\n * @requires component\n * @requires workflow\n * @requires helper\n * @requires mson\n * @description This module manages System Runtime metamodel.\n * System Runtime metamodel loads schemas and types, analyzes them and\n * creates the component classes and related DatabaseCollections.\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\nimport $component from './component.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n}\n\n/* Private methods */\n\n/**\n * @method isInternalName\n * @param {String} name\n * @private\n * @description is name an internal name\n */\nfunction isInternalName(name) {\n let result = true\n\n if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {\n result = false\n }\n return result\n}\n\n/**\n * @method generateModels\n * @private\n * @description Generate the models\n */\nfunction generateModels() {\n let att = ''\n let name = ''\n let schemaName = ''\n let schema = {}\n let schemaDef = null\n let modelName = ''\n let modelParent = null\n let modelExt = null\n let modelDef = null\n let model = {}\n let mergedModel = {}\n let parents = []\n let length = 0\n let i = 0\n let j = 0\n let nbAncestors = 0\n let sortInheritTree = []\n\n // default values\n for (schemaName in store.generatedSchemas) {\n schema = store.generatedSchemas[schemaName]\n\n // set model internal properties\n model = {\n _name: schema[$mson.NAME],\n }\n\n // set _core\n if (typeof schema[$mson.CORE] !== 'undefined') {\n model[$mson.CORE] = schema[$mson.CORE]\n }\n\n // set inherit\n if (Array.isArray(schema[$mson.INHERIT])) {\n model[$mson.INHERIT] = schema[$mson.INHERIT]\n }\n\n // set class\n if (typeof schema[$mson.CLASS] !== 'undefined') {\n model[$mson.CLASS] = schema[$mson.CLASS]\n }\n\n // set description\n if (typeof schema[$mson.DESCRIPTION] !== 'undefined') {\n model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]\n }\n\n // check valid name\n for (att in schema) {\n if (!isInternalName(att) && att.indexOf('_') === 0) {\n $log.invalidSchemaPropertyName(schema[$mson.NAME], att)\n }\n }\n\n // set model default values\n for (att in schema) {\n switch (true) {\n case schema[att] === 'property':\n model[att] = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'link':\n model[att] = {\n type: '_Component',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'method':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n result: 'any',\n description: att,\n }\n break\n case schema[att] === 'event':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n description: att,\n }\n break\n case schema[att] === 'collection':\n model[att] = {\n type: ['_Component'],\n readOnly: false,\n mandatory: false,\n default: [],\n description: att,\n label: att,\n }\n break\n default:\n if (!isInternalName(att)) {\n $log.invalidSchemaProperty(schema[$mson.NAME], att)\n }\n break\n }\n }\n\n store.generatedModels[model[$mson.NAME]] = model\n }\n\n // models to override\n for (modelName in store.generatedModels) {\n model = store.generatedModels[modelName]\n name = model[$mson.NAME]\n modelExt = store.models[name]\n if (modelExt) {\n mergedModel = merge(modelExt, model)\n store.generatedModels[name] = mergedModel\n }\n }\n\n // inheritance\n sortInheritTree = sortInheritanceTree()\n\n nbAncestors = sortInheritTree.length\n for (i = 0; i < nbAncestors; i++) {\n modelName = sortInheritTree[i]\n model = store.generatedModels[modelName]\n\n if (model) {\n parents = getParents(modelName)\n parents.reverse()\n\n length = parents.length\n for (j = 0; j < length; j++) {\n name = parents[j]\n modelParent = store.generatedModels[name]\n if (modelParent) {\n mergedModel = merge(modelParent, model)\n store.generatedModels[modelName] = mergedModel\n }\n }\n\n // last inherit\n // is the overriden model\n modelExt = store.models[modelName]\n if (modelExt) {\n mergedModel = merge(modelExt, store.generatedModels[modelName])\n store.generatedModels[modelName] = mergedModel\n }\n }\n }\n\n // save\n for (schemaName in store.generatedSchemas) {\n schemaDef = store.generatedSchemas[schemaName]\n $db.collections._GeneratedSchema.insert(schemaDef)\n }\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n $db.collections._GeneratedModel.insert(modelDef)\n }\n}\n\n/**\n * @method loadInMemory\n * @private\n * @description Load schemas and types in memory\n */\nfunction loadInMemory() {\n let schemas = []\n let types = []\n let schema = null\n let model = {}\n let models = []\n let type = null\n let name = ''\n let inherit = ''\n let i = 0\n let length = 0\n\n // init store\n store.inheritance = {}\n store.inheritanceTree = {}\n store.schemas = {}\n store.generatedSchemas = {}\n store.models = {}\n store.generatedModels = {}\n store.states = {}\n store.type = {}\n\n // load schemas\n schemas = $db.collections._Schema.find({})\n\n length = schemas.length\n for (i = 0; i < length; i++) {\n schema = schemas[i]\n\n name = schema[$mson.NAME]\n inherit = schema[$mson.INHERIT]\n\n store.schemas[name] = schema\n if (inherit) {\n store.inheritance[name] = inherit\n }\n\n if (!schema[$mson.CORE]) {\n $log.loadSchema(name)\n }\n }\n\n // load models\n models = $db.collections._Model.find({})\n\n length = models.length\n for (i = 0; i < length; i++) {\n model = models[i]\n name = model[$mson.NAME]\n\n store.models[name] = model\n\n if (!model[$mson.CORE]) {\n $log.loadModel(name)\n }\n }\n\n // load types\n types = $db.collections._Type.find({})\n\n length = types.length\n for (i = 0; i < length; i++) {\n type = types[i]\n store.type[type.name] = type\n\n if (!type.core) {\n $log.loadType(type.name)\n }\n }\n}\n\n/**\n * @method createInheritanceTree\n * @private\n * @description Create the inheritance tree\n */\nfunction createInheritanceTree() {\n let name = ''\n let c3linerization = []\n let ancestors = []\n\n /**\n *\n * @param {Array} elts array of elts\n * @returns {Boolean} true if all the arrays are empty\n * @private\n * @description Check if we have finisehd to linerize\n */\n function _isEmpty(elts) {\n let i = 0\n let length = 0\n let result = true\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].length) {\n result = false\n }\n }\n return result\n }\n\n /**\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @private\n * @description Remove an elt from all the arrays\n */\n function _removeCandidate(elt, elts) {\n let i = 0\n let length = 0\n let arr = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) === 0) {\n arr = elts[i]\n arr.reverse()\n arr.pop()\n arr.reverse()\n elts[i] = arr\n }\n }\n }\n\n /**\n * @method _isCandidate\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @returns {Boolean} true if the element is a good candidate.\n * @private\n * @description Check the element is a good candidate\n */\n function _isCandidate(elt, elts) {\n let result = true\n let i = 0\n let length = 0\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) > 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"6.0.0-beta.2\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"6.0.0-beta.2\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"6.0.0-beta.2\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAA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,YACRV,KAAQ,SACRW,OAAU,CACTW,QAAW,CACVtB,KAAQ,SACRC,WAAa,GAEd6V,MAAS,CACR9V,KAAQ,SACRC,WAAa,IAGfY,MAAQ,IAGVke,WAAc,CACbS,SAAY,CACXY,QAAW,CACVrgB,IAAO,YAGT+hB,UAAa,CACZC,GAAM,CACLhiB,IAAO,OAGTqC,QAAW,CACV4f,OAAU,CACTjiB,IAAO,SACPmB,MAAS,SAGX+gB,WAAc,CACbC,UAAa,CACZniB,IAAO,cAGT6I,SAAY,CACXuZ,QAAW,CACVpiB,IAAO,UACP2e,QAAW,iBAGb0D,SAAY,CACXC,QAAW,CACVtiB,IAAO,aAIVA,IAAO,oBDh0CRiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index bfeac15..0000000 --- a/package-lock.json +++ /dev/null @@ -1,9617 +0,0 @@ -{ - "name": "system-runtime", - "version": "6.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "system-runtime", - "version": "6.0.0", - "license": "Apache-2.0", - "devDependencies": { - "@rollup/plugin-terser": "^0.1.0", - "chai": "4.3.6", - "cypress": "10.11.0", - "eslint": "8.26.0", - "eslint-plugin-mocha": "10.1.0", - "grunt": "1.5.3", - "grunt-cli": "1.4.3", - "grunt-contrib-clean": "2.0.1", - "grunt-contrib-concat": "2.1.0", - "grunt-json-merge": "0.2.2", - "husky": "8.0.1", - "lint-staged": "13.0.3", - "load-grunt-tasks": "5.1.0", - "mocha": "10.1.0", - "prettier": "2.7.1", - "rollup": "3.2.3", - "serve": "14.0.1" - } - }, - "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@cypress/request": { - "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", - "dev": true, - "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.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@cypress/xvfb": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", - "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", - "dev": true, - "dependencies": { - "debug": "^3.1.0", - "lodash.once": "^4.1.1" - } - }, - "node_modules/@cypress/xvfb/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.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/@humanwhocodes/config-array": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "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==", - "dev": true - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rollup/plugin-terser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", - "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", - "dev": true, - "dependencies": { - "terser": "^5.15.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.x || ^3.x" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "14.18.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", - "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", - "dev": true - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", - "dev": true - }, - "node_modules/@types/sizzle": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", - "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", - "dev": true - }, - "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "dev": true, - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@zeit/schemas": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", - "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "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-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "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" - } - ] - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "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" - } - ] - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/blob-util": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", - "dev": true - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/boxen": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", - "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.0", - "chalk": "^5.0.1", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/boxen/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/boxen/node_modules/chalk": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", - "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/boxen/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/boxen/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/wrap-ansi": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "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" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cachedir": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", - "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "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/chalk-template": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", - "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/chalk-template?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "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", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", - "dev": true - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cli-boxes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-table3": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - } - }, - "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-truncate/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/clipboardy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", - "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", - "dev": true, - "dependencies": { - "arch": "^2.2.0", - "execa": "^5.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "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/clipboardy/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clipboardy/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true - }, - "node_modules/colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/common-tags": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", - "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cypress": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", - "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@cypress/request": "^2.88.10", - "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", - "@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.6.0", - "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": "^5.1.0", - "common-tags": "^1.8.0", - "dayjs": "^1.10.4", - "debug": "^4.3.2", - "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.0", - "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.6", - "ospath": "^1.2.2", - "pretty-bytes": "^5.6.0", - "proxy-from-env": "1.0.0", - "request-progress": "^3.0.0", - "semver": "^7.3.2", - "supports-color": "^8.1.1", - "tmp": "~0.2.1", - "untildify": "^4.0.0", - "yauzl": "^2.10.0" - }, - "bin": { - "cypress": "bin/cypress" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/dayjs": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", - "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", - "dev": true, - "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "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.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "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.15.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "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.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "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-plugin-mocha": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", - "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", - "dev": true, - "dependencies": { - "eslint-utils": "^3.0.0", - "rambda": "^7.1.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eventemitter2": { - "version": "6.4.7", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", - "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", - "dev": true - }, - "node_modules/execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, - "dependencies": { - "pify": "^2.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dev": true, - "dependencies": { - "punycode": "^1.3.2" - } - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", - "dev": true, - "dependencies": { - "glob": "~5.0.0" - }, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/findup-sync/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "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, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "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 - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "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": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/getobject": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/getos": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", - "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", - "dev": true, - "dependencies": { - "async": "^3.2.0" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "node_modules/grunt": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", - "dev": true, - "dependencies": { - "dateformat": "~3.0.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.2", - "findup-sync": "~0.3.0", - "glob": "~7.1.6", - "grunt-cli": "~1.4.3", - "grunt-known-options": "~2.0.0", - "grunt-legacy-log": "~3.0.0", - "grunt-legacy-util": "~2.0.1", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.14.0", - "minimatch": "~3.0.4", - "mkdirp": "~1.0.4", - "nopt": "~3.0.6", - "rimraf": "~3.0.2" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/grunt-cli": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", - "dev": true, - "dependencies": { - "grunt-known-options": "~2.0.0", - "interpret": "~1.1.0", - "liftup": "~3.0.1", - "nopt": "~4.0.1", - "v8flags": "~3.2.0" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-cli/node_modules/nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "dependencies": { - "abbrev": "1", - "osenv": "^0.1.4" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/grunt-contrib-clean": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", - "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", - "dev": true, - "dependencies": { - "async": "^3.2.3", - "rimraf": "^2.6.2" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "grunt": ">=0.4.5" - } - }, - "node_modules/grunt-contrib-clean/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/grunt-contrib-concat": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", - "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "source-map": "^0.5.3" - }, - "engines": { - "node": ">=0.12.0" - }, - "peerDependencies": { - "grunt": ">=1.4.1" - } - }, - "node_modules/grunt-json-merge": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", - "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", - "dev": true, - "dependencies": { - "underscore": "^1.6.0", - "underscore-deep-extend": "0.0.3" - }, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": ">=0.4" - } - }, - "node_modules/grunt-known-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-legacy-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", - "dev": true, - "dependencies": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.19" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/grunt-legacy-log-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", - "dev": true, - "dependencies": { - "chalk": "~4.1.0", - "lodash": "~4.17.19" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-legacy-util": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", - "dev": true, - "dependencies": { - "async": "~3.2.0", - "exit": "~0.1.2", - "getobject": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.21", - "underscore.string": "~3.3.5", - "which": "~2.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/grunt/node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "node_modules/grunt/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/grunt/node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/grunt/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/http-signature": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.14.1" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true, - "engines": { - "node": ">=8.12.0" - } - }, - "node_modules/husky": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", - "dev": true, - "bin": { - "husky": "lib/bin.js" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "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" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", - "dev": true - }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "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-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-port-reachable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", - "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, - "node_modules/js-sdsl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lazy-ass": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", - "dev": true, - "engines": { - "node": "> 0.8" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/liftup": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", - "dev": true, - "dependencies": { - "extend": "^3.0.2", - "findup-sync": "^4.0.0", - "fined": "^1.2.0", - "flagged-respawn": "^1.0.1", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.1", - "rechoir": "^0.7.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/liftup/node_modules/findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "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/lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", - "dev": true, - "dependencies": { - "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", - "debug": "^4.3.4", - "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-inspect": "^1.12.2", - "pidtree": "^0.6.0", - "string-argv": "^0.3.1", - "yaml": "^2.1.1" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": "^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/lint-staged/node_modules/commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", - "dev": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/lint-staged/node_modules/execa": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^3.0.1", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", - "dev": true, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/lint-staged/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/lint-staged/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", - "dev": true, - "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.5", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" - }, - "peerDependenciesMeta": { - "enquirer": { - "optional": true - } - } - }, - "node_modules/lint-staged/node_modules/listr2/node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", - "dev": true, - "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lint-staged/node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lint-staged/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", - "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", - "dev": true, - "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/listr2/node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", - "dev": true, - "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/listr2/node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/load-grunt-tasks": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", - "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", - "dev": true, - "dependencies": { - "arrify": "^2.0.1", - "multimatch": "^4.0.0", - "pkg-up": "^3.1.0", - "resolve-pkg": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "grunt": ">=1" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", - "dev": true, - "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/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "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", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", - "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/multimatch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", - "dev": true, - "dependencies": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "dev": true, - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "dev": true, - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "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.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "node_modules/ospath": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", - "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", - "dev": true - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "dev": true, - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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/path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "dev": true, - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-up/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-up/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-bytes": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", - "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/proxy-from-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", - "dev": true - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "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" - } - ] - }, - "node_modules/rambda": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", - "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", - "dev": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "dependencies": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", - "dev": true, - "dependencies": { - "rc": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/request-progress": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", - "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", - "dev": true, - "dependencies": { - "throttleit": "^1.0.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "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/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", - "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-pkg/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.3.tgz", - "integrity": "sha512-qfadtkY5kl0F5e4dXVdj2D+GtOdifasXHFMiL1SMf9ADQDv5Eti6xReef9FKj+iQPR2pvtqWna57s/PjARY4fg==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", - "dev": true, - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "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" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", - "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", - "dev": true, - "dependencies": { - "@zeit/schemas": "2.21.0", - "ajv": "8.11.0", - "arg": "5.0.2", - "boxen": "7.0.0", - "chalk": "5.0.1", - "chalk-template": "0.4.0", - "clipboardy": "3.0.0", - "compression": "1.7.4", - "is-port-reachable": "4.0.0", - "serve-handler": "6.1.3", - "update-check": "1.5.4" - }, - "bin": { - "serve": "build/main.js" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", - "dev": true, - "dependencies": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", - "mime-types": "2.1.18", - "minimatch": "3.0.4", - "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", - "range-parser": "1.2.0" - } - }, - "node_modules/serve-handler/node_modules/mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-handler/node_modules/mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "dependencies": { - "mime-db": "~1.33.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-handler/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/serve/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/serve/node_modules/chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/serve/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "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/string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/terser": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", - "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "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", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/throttleit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", - "dev": true - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true - }, - "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "dependencies": { - "rimraf": "^3.0.0" - }, - "engines": { - "node": ">=8.17.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "node_modules/underscore-deep-extend": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/underscore-deep-extend/-/underscore-deep-extend-0.0.3.tgz", - "integrity": "sha512-Spmxxx7Oa5kDBgZADaod6TWZVVD/Pw//VrhgZcWdKP1h23HGEpQFuF/xjCT5A0NhsolJaCVewvCU3n/vBa6HDA==", - "dev": true - }, - "node_modules/underscore.string": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", - "dev": true, - "dependencies": { - "sprintf-js": "^1.1.1", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/update-check": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", - "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", - "dev": true, - "dependencies": { - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/widest-line": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", - "dev": true, - "dependencies": { - "string-width": "^5.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/widest-line/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/widest-line/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/widest-line/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/widest-line/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "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/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", - "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", - "dev": true, - "optional": true - }, - "@cypress/request": { - "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", - "dev": true, - "requires": { - "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.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^8.3.2" - } - }, - "@cypress/xvfb": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", - "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "lodash.once": "^4.1.1" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.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" - } - }, - "@humanwhocodes/config-array": { - "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@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==", - "dev": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@rollup/plugin-terser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", - "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", - "dev": true, - "requires": { - "terser": "^5.15.1" - } - }, - "@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "@types/node": { - "version": "14.18.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", - "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", - "dev": true - }, - "@types/sinonjs__fake-timers": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", - "dev": true - }, - "@types/sizzle": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", - "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", - "dev": true - }, - "@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "dev": true, - "optional": true, - "requires": { - "@types/node": "*" - } - }, - "@zeit/schemas": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", - "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - } - }, - "acorn": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "requires": { - "string-width": "^4.1.0" - } - }, - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arch": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", - "dev": true - }, - "arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "dev": true - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "blob-util": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "boxen": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", - "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", - "dev": true, - "requires": { - "ansi-align": "^3.0.1", - "camelcase": "^7.0.0", - "chalk": "^5.0.1", - "cli-boxes": "^3.0.0", - "string-width": "^5.1.2", - "type-fest": "^2.13.0", - "widest-line": "^4.0.1", - "wrap-ansi": "^8.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - }, - "chalk": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", - "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - }, - "type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", - "dev": true - }, - "wrap-ansi": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", - "dev": true, - "requires": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true - }, - "cachedir": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", - "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", - "dev": true - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "chalk-template": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", - "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", - "dev": true, - "requires": { - "chalk": "^4.1.2" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true - }, - "check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", - "dev": true - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.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" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cli-boxes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", - "dev": true - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-table3": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", - "dev": true, - "requires": { - "@colors/colors": "1.5.0", - "string-width": "^4.2.0" - } - }, - "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "requires": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "clipboardy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", - "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", - "dev": true, - "requires": { - "arch": "^2.2.0", - "execa": "^5.1.1", - "is-wsl": "^2.2.0" - }, - "dependencies": { - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "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" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - } - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true - }, - "common-tags": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", - "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", - "dev": true - }, - "compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "requires": { - "mime-db": ">= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "cypress": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", - "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", - "dev": true, - "requires": { - "@cypress/request": "^2.88.10", - "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", - "@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.6.0", - "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": "^5.1.0", - "common-tags": "^1.8.0", - "dayjs": "^1.10.4", - "debug": "^4.3.2", - "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.0", - "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.6", - "ospath": "^1.2.2", - "pretty-bytes": "^5.6.0", - "proxy-from-env": "1.0.0", - "request-progress": "^3.0.0", - "semver": "^7.3.2", - "supports-color": "^8.1.1", - "tmp": "~0.2.1", - "untildify": "^4.0.0", - "yauzl": "^2.10.0" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true - }, - "dayjs": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", - "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", - "dev": true, - "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "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.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", - "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.15.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "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.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - } - }, - "eslint-plugin-mocha": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", - "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", - "dev": true, - "requires": { - "eslint-utils": "^3.0.0", - "rambda": "^7.1.0" - } - }, - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "eventemitter2": { - "version": "6.4.7", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", - "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", - "dev": true - }, - "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, - "requires": { - "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" - } - }, - "executable": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", - "dev": true, - "requires": { - "pify": "^2.2.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "requires": { - "@types/yauzl": "^2.9.1", - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dev": true, - "requires": { - "punycode": "^1.3.2" - } - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - } - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", - "dev": true, - "requires": { - "glob": "~5.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "getobject": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", - "dev": true - }, - "getos": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", - "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", - "dev": true, - "requires": { - "async": "^3.2.0" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "requires": { - "is-glob": "^4.0.3" - } - }, - "global-dirs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", - "dev": true, - "requires": { - "ini": "2.0.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "grunt": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", - "dev": true, - "requires": { - "dateformat": "~3.0.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.2", - "findup-sync": "~0.3.0", - "glob": "~7.1.6", - "grunt-cli": "~1.4.3", - "grunt-known-options": "~2.0.0", - "grunt-legacy-log": "~3.0.0", - "grunt-legacy-util": "~2.0.1", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.14.0", - "minimatch": "~3.0.4", - "mkdirp": "~1.0.4", - "nopt": "~3.0.6", - "rimraf": "~3.0.2" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - } - } - }, - "grunt-cli": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", - "dev": true, - "requires": { - "grunt-known-options": "~2.0.0", - "interpret": "~1.1.0", - "liftup": "~3.0.1", - "nopt": "~4.0.1", - "v8flags": "~3.2.0" - }, - "dependencies": { - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - } - } - }, - "grunt-contrib-clean": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", - "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", - "dev": true, - "requires": { - "async": "^3.2.3", - "rimraf": "^2.6.2" - }, - "dependencies": { - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, - "grunt-contrib-concat": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", - "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", - "dev": true, - "requires": { - "chalk": "^4.1.2", - "source-map": "^0.5.3" - } - }, - "grunt-json-merge": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", - "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", - "dev": true, - "requires": { - "underscore": "^1.6.0", - "underscore-deep-extend": "0.0.3" - } - }, - "grunt-known-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", - "dev": true - }, - "grunt-legacy-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", - "dev": true, - "requires": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.19" - } - }, - "grunt-legacy-log-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", - "dev": true, - "requires": { - "chalk": "~4.1.0", - "lodash": "~4.17.19" - } - }, - "grunt-legacy-util": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", - "dev": true, - "requires": { - "async": "~3.2.0", - "exit": "~0.1.2", - "getobject": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.21", - "underscore.string": "~3.3.5", - "which": "~2.0.2" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true - }, - "http-signature": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^2.0.2", - "sshpk": "^1.14.1" - } - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true - }, - "husky": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, - "requires": { - "ci-info": "^3.2.0" - } - }, - "is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "requires": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-port-reachable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", - "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", - "dev": true - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, - "js-sdsl": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "jsprim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "lazy-ass": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "liftup": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", - "dev": true, - "requires": { - "extend": "^3.0.2", - "findup-sync": "^4.0.0", - "fined": "^1.2.0", - "flagged-respawn": "^1.0.1", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.1", - "rechoir": "^0.7.0", - "resolve": "^1.19.0" - }, - "dependencies": { - "findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - } - } - } - }, - "lilconfig": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", - "dev": true - }, - "lint-staged": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", - "dev": true, - "requires": { - "cli-truncate": "^3.1.0", - "colorette": "^2.0.17", - "commander": "^9.3.0", - "debug": "^4.3.4", - "execa": "^6.1.0", - "lilconfig": "2.0.5", - "listr2": "^4.0.5", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "object-inspect": "^1.12.2", - "pidtree": "^0.6.0", - "string-argv": "^0.3.1", - "yaml": "^2.1.1" - }, - "dependencies": { - "commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", - "dev": true - }, - "execa": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^3.0.1", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true - }, - "listr2": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", - "dev": true, - "requires": { - "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.5", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", - "dev": true, - "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - } - } - } - }, - "mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true - }, - "npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, - "requires": { - "path-key": "^4.0.0" - } - }, - "onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "requires": { - "mimic-fn": "^4.0.0" - } - }, - "path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true - }, - "slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true - } - } - }, - "listr2": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", - "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", - "dev": true, - "requires": { - "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" - }, - "dependencies": { - "cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", - "dev": true, - "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - } - } - }, - "load-grunt-tasks": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", - "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", - "dev": true, - "requires": { - "arrify": "^2.0.1", - "multimatch": "^4.0.0", - "pkg-up": "^3.1.0", - "resolve-pkg": "^2.0.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", - "dev": true, - "requires": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", - "dev": true, - "requires": { - "get-func-name": "^2.0.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "mocha": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", - "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", - "dev": true, - "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "multimatch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", - "dev": true, - "requires": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" - } - }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "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.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "ospath": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", - "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", - "dev": true - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "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 - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", - "dev": true - }, - "path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - }, - "pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - } - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", - "dev": true - }, - "pretty-bytes": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", - "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", - "dev": true - }, - "proxy-from-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", - "dev": true - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "rambda": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", - "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", - "dev": true - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - } - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "requires": { - "resolve": "^1.9.0" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, - "request-progress": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", - "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", - "dev": true, - "requires": { - "throttleit": "^1.0.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", - "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rollup": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.3.tgz", - "integrity": "sha512-qfadtkY5kl0F5e4dXVdj2D+GtOdifasXHFMiL1SMf9ADQDv5Eti6xReef9FKj+iQPR2pvtqWna57s/PjARY4fg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "rxjs": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", - "dev": true, - "requires": { - "tslib": "^2.1.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "serve": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", - "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", - "dev": true, - "requires": { - "@zeit/schemas": "2.21.0", - "ajv": "8.11.0", - "arg": "5.0.2", - "boxen": "7.0.0", - "chalk": "5.0.1", - "chalk-template": "0.4.0", - "clipboardy": "3.0.0", - "compression": "1.7.4", - "is-port-reachable": "4.0.0", - "serve-handler": "6.1.3", - "update-check": "1.5.4" - }, - "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "chalk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, - "serve-handler": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", - "mime-types": "2.1.18", - "minimatch": "3.0.4", - "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", - "range-parser": "1.2.0" - }, - "dependencies": { - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", - "dev": true - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "dev": true, - "requires": { - "mime-db": "~1.33.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "requires": { - "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" - } - }, - "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - } - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "terser": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", - "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "throttleit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true - }, - "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "requires": { - "rimraf": "^3.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true - }, - "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "underscore-deep-extend": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/underscore-deep-extend/-/underscore-deep-extend-0.0.3.tgz", - "integrity": "sha512-Spmxxx7Oa5kDBgZADaod6TWZVVD/Pw//VrhgZcWdKP1h23HGEpQFuF/xjCT5A0NhsolJaCVewvCU3n/vBa6HDA==", - "dev": true - }, - "underscore.string": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", - "dev": true, - "requires": { - "sprintf-js": "^1.1.1", - "util-deprecate": "^1.0.2" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - }, - "untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true - }, - "update-check": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", - "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", - "dev": true, - "requires": { - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true - }, - "v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "widest-line": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", - "dev": true, - "requires": { - "string-width": "^5.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - } - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yaml": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", - "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - } - } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/package.json b/package.json index f0eb96e..aa5c6a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "system-runtime", - "version": "6.0.0", + "version": "6.0.0-beta.2", "description": "A JavaScript library that runs systems", "homepage": "https://designfirst.io/systemruntime/", "keywords": [ @@ -55,7 +55,7 @@ "load-grunt-tasks": "5.1.0", "mocha": "10.1.0", "prettier": "2.7.1", - "rollup": "3.2.3", + "rollup": "3.2.5", "serve": "14.0.1" }, "engines": { diff --git a/src/system.js b/src/system.js index 199f992..b327285 100644 --- a/src/system.js +++ b/src/system.js @@ -35,7 +35,7 @@ export default { system: { name: 'system-runtime', master: false, - version: '5.1.0', + version: '6.0.0-beta.2', description: 'System Runtime', schemas: { '1ac07185641fa9f': { @@ -574,7 +574,7 @@ export default { type: 'string', readOnly: true, mandatory: true, - default: '5.1.0', + default: '6.0.0-beta.2', }, system: { params: [ @@ -1368,7 +1368,7 @@ export default { _Runtime: { runtime: { _id: 'runtime', - version: '5.1.0', + version: '6.0.0-beta.2', }, }, _History: { diff --git a/src/system/system-runtime.json b/src/system/system-runtime.json index 574cab3..13030e2 100644 --- a/src/system/system-runtime.json +++ b/src/system/system-runtime.json @@ -1,7 +1,7 @@ { "name": "system-runtime", "master": false, - "version": "5.1.0", + "version": "6.0.0-beta.2", "description": "System Runtime", "schemas": { "1ac07185641fa9f": { @@ -379,7 +379,7 @@ "type": "string", "readOnly": true, "mandatory": true, - "default": "5.1.0" + "default": "6.0.0-beta.2" }, "system": { "params": [{ "name": "params", "type": "any", "mandatory": false }], @@ -967,7 +967,7 @@ "_Database": { "db": { "_id": "db" } }, "_Logger": { "logger": { "_id": "logger", "level": "warn" } }, "_Metamodel": { "metamodel": { "_id": "metamodel" } }, - "_Runtime": { "runtime": { "_id": "runtime", "version": "5.1.0" } }, + "_Runtime": { "runtime": { "_id": "runtime", "version": "6.0.0-beta.2" } }, "_History": { "history": { "_id": "history" } } }, "_id": "e89c617b6b15d24" From 1513628c23a2d6d54a46c71cc9274894fe3d58e8 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 15:37:54 +0100 Subject: [PATCH 06/12] chore: bump 6.0.0-beta.3 --- Gruntfile.cjs | 4 +- dist/system-runtime.min.js | 20 + dist/system-runtime.mon.js | 1 + package-lock.json | 9620 ++++++++++++++++++++++++++++++++++++ package.json | 4 +- rollup.config.cjs.js | 30 + tasks/concat.json | 6 +- 7 files changed, 9680 insertions(+), 5 deletions(-) create mode 100644 dist/system-runtime.min.js create mode 100644 dist/system-runtime.mon.js create mode 100644 package-lock.json create mode 100644 rollup.config.cjs.js diff --git a/Gruntfile.cjs b/Gruntfile.cjs index 3e2dc02..7089397 100644 --- a/Gruntfile.cjs +++ b/Gruntfile.cjs @@ -33,6 +33,6 @@ module.exports = (grunt) => { // build system grunt.registerTask('system', ['clean', 'json_merge', 'concat:system']) - // add licence - grunt.registerTask('licence', ['concat:license']) + // add licenses + grunt.registerTask('licenses', ['concat:licenses']) } diff --git a/dist/system-runtime.min.js b/dist/system-runtime.min.js new file mode 100644 index 0000000..ee2014a --- /dev/null +++ b/dist/system-runtime.min.js @@ -0,0 +1,20 @@ +/*! + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +"use strict";var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=R(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o= 16.0.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cypress/request": { + "version": "2.88.10", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", + "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", + "dev": true, + "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.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "dependencies": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + } + }, + "node_modules/@cypress/xvfb/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.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/@humanwhocodes/config-array": { + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "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==", + "dev": true + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", + "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", + "dev": true, + "dependencies": { + "terser": "^5.15.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.x || ^3.x" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", + "dev": true + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "node_modules/@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@zeit/schemas": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", + "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "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" + } + ] + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/boxen": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.1", + "camelcase": "^7.0.0", + "chalk": "^5.0.1", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/boxen/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", + "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/boxen/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "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" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/chalk-template?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "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", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ci-info": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "dev": true + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-truncate": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/clipboardy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", + "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", + "dev": true, + "dependencies": { + "arch": "^2.2.0", + "execa": "^5.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "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/clipboardy/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "node_modules/colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cypress": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", + "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@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.6.0", + "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": "^5.1.0", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.2", + "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.0", + "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.6", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/dayjs": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "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.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "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.15.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "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.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "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-plugin-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", + "dev": true, + "dependencies": { + "eslint-utils": "^3.0.0", + "rambda": "^7.1.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter2": { + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true + }, + "node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dev": true, + "dependencies": { + "punycode": "^1.3.2" + } + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", + "dev": true, + "dependencies": { + "glob": "~5.0.0" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/findup-sync/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "dev": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dev": true, + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "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, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "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 + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "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": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getobject": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "dependencies": { + "async": "^3.2.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "node_modules/grunt": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", + "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", + "dev": true, + "dependencies": { + "dateformat": "~3.0.3", + "eventemitter2": "~0.4.13", + "exit": "~0.1.2", + "findup-sync": "~0.3.0", + "glob": "~7.1.6", + "grunt-cli": "~1.4.3", + "grunt-known-options": "~2.0.0", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", + "nopt": "~3.0.6", + "rimraf": "~3.0.2" + }, + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/grunt-cli": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", + "dev": true, + "dependencies": { + "grunt-known-options": "~2.0.0", + "interpret": "~1.1.0", + "liftup": "~3.0.1", + "nopt": "~4.0.1", + "v8flags": "~3.2.0" + }, + "bin": { + "grunt": "bin/grunt" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt-cli/node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/grunt-contrib-clean": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", + "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "rimraf": "^2.6.2" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "grunt": ">=0.4.5" + } + }, + "node_modules/grunt-contrib-clean/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/grunt-contrib-concat": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "source-map": "^0.5.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "grunt": ">=1.4.1" + } + }, + "node_modules/grunt-json-merge": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", + "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", + "dev": true, + "dependencies": { + "underscore": "^1.6.0", + "underscore-deep-extend": "0.0.3" + }, + "engines": { + "node": ">= 0.8.0" + }, + "peerDependencies": { + "grunt": ">=0.4" + } + }, + "node_modules/grunt-known-options": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grunt-legacy-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", + "dev": true, + "dependencies": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.19" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/grunt-legacy-log-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", + "dev": true, + "dependencies": { + "chalk": "~4.1.0", + "lodash": "~4.17.19" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt-legacy-util": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", + "dev": true, + "dependencies": { + "async": "~3.2.0", + "exit": "~0.1.2", + "getobject": "~1.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.21", + "underscore.string": "~3.3.5", + "which": "~2.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/grunt/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/grunt/node_modules/eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", + "dev": true + }, + "node_modules/grunt/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/grunt/node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/grunt/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/husky": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "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" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", + "dev": true + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "dependencies": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "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-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-port-reachable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", + "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "dependencies": { + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "dependencies": { + "unc-path-regex": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true + }, + "node_modules/js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", + "dev": true, + "engines": { + "node": "> 0.8" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/liftup": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", + "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", + "dev": true, + "dependencies": { + "extend": "^3.0.2", + "findup-sync": "^4.0.0", + "fined": "^1.2.0", + "flagged-respawn": "^1.0.1", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.1", + "rechoir": "^0.7.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/liftup/node_modules/findup-sync": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", + "dev": true, + "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/lilconfig": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lint-staged": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", + "dev": true, + "dependencies": { + "cli-truncate": "^3.1.0", + "colorette": "^2.0.17", + "commander": "^9.3.0", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.5", + "listr2": "^4.0.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.1", + "yaml": "^2.1.1" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/lint-staged/node_modules/execa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "dev": true, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/lint-staged/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/lint-staged/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/listr2": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", + "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "dev": true, + "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.5", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/lint-staged/node_modules/listr2/node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lint-staged/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "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/listr2/node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/listr2/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/load-grunt-tasks": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", + "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", + "dev": true, + "dependencies": { + "arrify": "^2.0.1", + "multimatch": "^4.0.0", + "pkg-up": "^3.1.0", + "resolve-pkg": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "grunt": ">=1" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "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/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "dev": true, + "dependencies": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dev": true, + "dependencies": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dev": true, + "dependencies": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "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.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dev": true, + "dependencies": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dev": true, + "dependencies": { + "path-root-regex": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-up/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-up/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "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" + } + ] + }, + "node_modules/rambda": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", + "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", + "dev": true + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "dependencies": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "dev": true, + "dependencies": { + "rc": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, + "dependencies": { + "throttleit": "^1.0.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "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/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dev": true, + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", + "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-pkg/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.5.tgz", + "integrity": "sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=14.18.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "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" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", + "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", + "dev": true, + "dependencies": { + "@zeit/schemas": "2.21.0", + "ajv": "8.11.0", + "arg": "5.0.2", + "boxen": "7.0.0", + "chalk": "5.0.1", + "chalk-template": "0.4.0", + "clipboardy": "3.0.0", + "compression": "1.7.4", + "is-port-reachable": "4.0.0", + "serve-handler": "6.1.3", + "update-check": "1.5.4" + }, + "bin": { + "serve": "build/main.js" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/serve-handler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "dev": true, + "dependencies": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.0.4", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" + } + }, + "node_modules/serve-handler/node_modules/mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "dependencies": { + "mime-db": "~1.33.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-handler/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/serve/node_modules/ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/serve/node_modules/chalk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/serve/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "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/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/terser": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "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", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "node_modules/underscore-deep-extend": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/underscore-deep-extend/-/underscore-deep-extend-0.0.3.tgz", + "integrity": "sha512-Spmxxx7Oa5kDBgZADaod6TWZVVD/Pw//VrhgZcWdKP1h23HGEpQFuF/xjCT5A0NhsolJaCVewvCU3n/vBa6HDA==", + "dev": true + }, + "node_modules/underscore.string": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", + "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", + "dev": true, + "dependencies": { + "sprintf-js": "^1.1.1", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-check": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", + "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", + "dev": true, + "dependencies": { + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dev": true, + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", + "dev": true, + "dependencies": { + "string-width": "^5.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/widest-line/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/widest-line/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/widest-line/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "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/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true + }, + "@cypress/request": { + "version": "2.88.10", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", + "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", + "dev": true, + "requires": { + "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.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + } + }, + "@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@eslint/eslintrc": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.15.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" + } + }, + "@humanwhocodes/config-array": { + "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@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==", + "dev": true + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@rollup/plugin-terser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", + "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", + "dev": true, + "requires": { + "terser": "^5.15.1" + } + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true + }, + "@types/node": { + "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", + "dev": true + }, + "@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, + "@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, + "@zeit/schemas": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", + "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "requires": { + "string-width": "^4.1.0" + } + }, + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true + }, + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "boxen": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", + "dev": true, + "requires": { + "ansi-align": "^3.0.1", + "camelcase": "^7.0.0", + "chalk": "^5.0.1", + "cli-boxes": "^3.0.0", + "string-width": "^5.1.2", + "type-fest": "^2.13.0", + "widest-line": "^4.0.1", + "wrap-ansi": "^8.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "chalk": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", + "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "type-fest": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "dev": true + }, + "wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true + }, + "cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true + }, + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chalk-template": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", + "dev": true, + "requires": { + "chalk": "^4.1.2" + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true + }, + "check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.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" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "ci-info": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "dev": true + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-boxes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "requires": { + "@colors/colors": "1.5.0", + "string-width": "^4.2.0" + } + }, + "cli-truncate": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "dev": true, + "requires": { + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "clipboardy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", + "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", + "dev": true, + "requires": { + "arch": "^2.2.0", + "execa": "^5.1.1", + "is-wsl": "^2.2.0" + }, + "dependencies": { + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "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" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + } + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + }, + "common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "cypress": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", + "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", + "dev": true, + "requires": { + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@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.6.0", + "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": "^5.1.0", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.2", + "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.0", + "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.6", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "dayjs": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", + "dev": true + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint": { + "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^1.3.3", + "@humanwhocodes/config-array": "^0.11.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "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.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.0", + "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.15.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "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.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + } + }, + "eslint-plugin-mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", + "dev": true, + "requires": { + "eslint-utils": "^3.0.0", + "rambda": "^7.1.0" + } + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "eventemitter2": { + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "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" + } + }, + "executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "requires": { + "pify": "^2.2.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", + "dev": true, + "requires": { + "punycode": "^1.3.2" + } + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "getobject": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", + "dev": true + }, + "getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "requires": { + "async": "^3.2.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "globals": { + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, + "grunt": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", + "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", + "dev": true, + "requires": { + "dateformat": "~3.0.3", + "eventemitter2": "~0.4.13", + "exit": "~0.1.2", + "findup-sync": "~0.3.0", + "glob": "~7.1.6", + "grunt-cli": "~1.4.3", + "grunt-known-options": "~2.0.0", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", + "nopt": "~3.0.6", + "rimraf": "~3.0.2" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + } + } + }, + "grunt-cli": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", + "dev": true, + "requires": { + "grunt-known-options": "~2.0.0", + "interpret": "~1.1.0", + "liftup": "~3.0.1", + "nopt": "~4.0.1", + "v8flags": "~3.2.0" + }, + "dependencies": { + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + } + } + }, + "grunt-contrib-clean": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", + "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", + "dev": true, + "requires": { + "async": "^3.2.3", + "rimraf": "^2.6.2" + }, + "dependencies": { + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "grunt-contrib-concat": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "source-map": "^0.5.3" + } + }, + "grunt-json-merge": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", + "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", + "dev": true, + "requires": { + "underscore": "^1.6.0", + "underscore-deep-extend": "0.0.3" + } + }, + "grunt-known-options": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", + "dev": true + }, + "grunt-legacy-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", + "dev": true, + "requires": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.19" + } + }, + "grunt-legacy-log-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", + "dev": true, + "requires": { + "chalk": "~4.1.0", + "lodash": "~4.17.19" + } + }, + "grunt-legacy-util": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", + "dev": true, + "requires": { + "async": "~3.2.0", + "exit": "~0.1.2", + "getobject": "~1.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.21", + "underscore.string": "~3.3.5", + "which": "~2.0.2" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", + "dev": true + }, + "http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "husky": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "requires": { + "ci-info": "^3.2.0" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-port-reachable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", + "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", + "dev": true + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true + }, + "js-sdsl": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "liftup": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", + "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", + "dev": true, + "requires": { + "extend": "^3.0.2", + "findup-sync": "^4.0.0", + "fined": "^1.2.0", + "flagged-respawn": "^1.0.1", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.1", + "rechoir": "^0.7.0", + "resolve": "^1.19.0" + }, + "dependencies": { + "findup-sync": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^4.0.2", + "resolve-dir": "^1.0.1" + } + } + } + }, + "lilconfig": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", + "dev": true + }, + "lint-staged": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", + "dev": true, + "requires": { + "cli-truncate": "^3.1.0", + "colorette": "^2.0.17", + "commander": "^9.3.0", + "debug": "^4.3.4", + "execa": "^6.1.0", + "lilconfig": "2.0.5", + "listr2": "^4.0.5", + "micromatch": "^4.0.5", + "normalize-path": "^3.0.0", + "object-inspect": "^1.12.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.1", + "yaml": "^2.1.1" + }, + "dependencies": { + "commander": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "dev": true + }, + "execa": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^3.0.1", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "listr2": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", + "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", + "dev": true, + "requires": { + "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.5", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + } + } + } + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + } + } + }, + "listr2": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "requires": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + } + } + }, + "load-grunt-tasks": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", + "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", + "dev": true, + "requires": { + "arrify": "^2.0.1", + "multimatch": "^4.0.0", + "pkg-up": "^3.1.0", + "resolve-pkg": "^2.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, + "log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "requires": { + "get-func-name": "^2.0.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "mocha": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", + "dev": true, + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + } + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "dev": true, + "requires": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + } + }, + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "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.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "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 + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", + "dev": true + }, + "path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + }, + "pkg-up": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + } + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "dev": true + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true + }, + "proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true + }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "rambda": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", + "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", + "dev": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true + } + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, + "requires": { + "throttleit": "^1.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", + "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "rollup": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.5.tgz", + "integrity": "sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", + "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", + "dev": true, + "requires": { + "@zeit/schemas": "2.21.0", + "ajv": "8.11.0", + "arg": "5.0.2", + "boxen": "7.0.0", + "chalk": "5.0.1", + "chalk-template": "0.4.0", + "clipboardy": "3.0.0", + "compression": "1.7.4", + "is-port-reachable": "4.0.0", + "serve-handler": "6.1.3", + "update-check": "1.5.4" + }, + "dependencies": { + "ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "chalk": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "serve-handler": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "content-disposition": "0.5.2", + "fast-url-parser": "1.1.3", + "mime-types": "2.1.18", + "minimatch": "3.0.4", + "path-is-inside": "1.0.2", + "path-to-regexp": "2.2.1", + "range-parser": "1.2.0" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "~1.33.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "requires": { + "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" + } + }, + "string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "terser": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true + }, + "underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "underscore-deep-extend": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/underscore-deep-extend/-/underscore-deep-extend-0.0.3.tgz", + "integrity": "sha512-Spmxxx7Oa5kDBgZADaod6TWZVVD/Pw//VrhgZcWdKP1h23HGEpQFuF/xjCT5A0NhsolJaCVewvCU3n/vBa6HDA==", + "dev": true + }, + "underscore.string": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", + "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", + "dev": true, + "requires": { + "sprintf-js": "^1.1.1", + "util-deprecate": "^1.0.2" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, + "update-check": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", + "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", + "dev": true, + "requires": { + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "widest-line": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", + "dev": true, + "requires": { + "string-width": "^5.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yaml": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json index aa5c6a7..b390582 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "system-runtime", - "version": "6.0.0-beta.2", + "version": "6.0.0-beta.3", "description": "A JavaScript library that runs systems", "homepage": "https://designfirst.io/systemruntime/", "keywords": [ @@ -32,7 +32,7 @@ "url": "https://github.com/design-first/system-runtime/issues" }, "scripts": { - "build": "grunt system && rollup --config rollup.config.js && grunt licence && prettier --write src/system.js", + "build": "grunt system && rollup --config rollup.config.js && rollup --config rollup.config.cjs.js && grunt licenses && prettier --write src/system.js", "example": "serve", "prettier": "prettier --write src/", "lint": "eslint --ext .js src/", diff --git a/rollup.config.cjs.js b/rollup.config.cjs.js new file mode 100644 index 0000000..c2d4626 --- /dev/null +++ b/rollup.config.cjs.js @@ -0,0 +1,30 @@ +/* + * System Runtime + * + * https://designfirst.io/systemruntime/ + * + * Copyright 2022 Erwan Carriou + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import terser from '@rollup/plugin-terser' + +export default { + input: 'src/runtime.js', + output: { + file: 'dist/system-runtime.min.js', + format: 'cjs', + }, + plugins: [terser()], +} diff --git a/tasks/concat.json b/tasks/concat.json index 2c909d1..cf965a2 100644 --- a/tasks/concat.json +++ b/tasks/concat.json @@ -8,11 +8,15 @@ ] } }, - "license": { + "licenses": { "files": { "dist/system-runtime.js": [ "src/banners/license.txt", "dist/system-runtime.js" + ], + "dist/system-runtime.min.js": [ + "src/banners/license.txt", + "dist/system-runtime.min.js" ] } } From ec8c120c5e7d76d89a52873e5f2c12b30ada3bae Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 16:00:02 +0100 Subject: [PATCH 07/12] chore: bump 6.0.0-beta.4 --- dist/system-runtime.js | 2 +- dist/system-runtime.js.map | 2 +- dist/system-runtime.min.js | 2 +- dist/system-runtime.mon.js | 1 - package-lock.json | 2606 ++++------------- package.json | 4 +- rollup.config.cjs.js => rollup.config.iife.js | 3 +- src/system.js | 6 +- src/system/system-runtime.json | 6 +- 9 files changed, 590 insertions(+), 2042 deletions(-) delete mode 100644 dist/system-runtime.mon.js rename rollup.config.cjs.js => rollup.config.iife.js (95%) diff --git a/dist/system-runtime.js b/dist/system-runtime.js index 3ef3249..d68802f 100644 --- a/dist/system-runtime.js +++ b/dist/system-runtime.js @@ -17,5 +17,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=R(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"6.0.0-beta.2\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"6.0.0-beta.2\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"6.0.0-beta.2\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,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PmB,MAAS,SAGX+gB,WAAc,CACbC,UAAa,CACZniB,IAAO,cAGT6I,SAAY,CACXuZ,QAAW,CACVpiB,IAAO,UACP2e,QAAW,iBAGb0D,SAAY,CACXC,QAAW,CACVtiB,IAAO,aAIVA,IAAO,oBDh0CRiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file +{"version":3,"file":"system-runtime.js","sources":["../src/mson.js","../src/log.js","../src/helper.js","../src/metamodel.js","../src/behavior.js","../src/state.js","../src/history.js","../src/workflow.js","../src/component.js","../src/db.js","../src/runtime.js","../src/system.js"],"sourcesContent":["/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module mson\n * @description This module contains all the mson definition.\n */\n\nconst ID = '_id'\nconst NAME = '_name'\nconst DESCRIPTION = '_description'\nconst INHERIT = '_inherit'\nconst CLASS = '_class'\nconst CORE = '_core'\n\nconst INTERNAL_NAMES = [\n '_id',\n '_name',\n '_inherit',\n '_description',\n '_class',\n '_core',\n]\n\nconst PROPERTY_TYPE = 'property'\nconst COLLECTION_TYPE = 'collection'\nconst LINK_TYPE = 'link'\nconst METHOD_TYPE = 'method'\nconst EVENT_TYPE = 'event'\n\nconst INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']\n\nconst DEFAULT_TYPES = [\n 'boolean',\n 'string',\n 'number',\n 'object',\n 'function',\n 'array',\n 'date',\n 'any',\n]\n\nconst SCHEMA_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n default: ['_Component'],\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst MODEL_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst TYPE_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n name: {\n type: 'string',\n mandatory: true,\n },\n type: {\n type: 'string',\n mandatory: true,\n },\n schema: {\n type: 'object',\n mandatory: false,\n },\n value: {\n type: ['any'],\n mandatory: false,\n },\n core: {\n type: 'boolean',\n mandatory: false,\n },\n description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nexport default {\n ID,\n NAME,\n DESCRIPTION,\n INHERIT,\n CLASS,\n CORE,\n INTERNAL_NAMES,\n PROPERTY_TYPE,\n COLLECTION_TYPE,\n LINK_TYPE,\n METHOD_TYPE,\n EVENT_TYPE,\n INTERNAL_TYPES,\n DEFAULT_TYPES,\n SCHEMA_DEFINITION,\n MODEL_DEFINITION,\n TYPE_DEFINITION,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module log\n * @requires metamodel\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions that write a log\n */\n\nimport $metamodel from './metamodel.js'\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet currentLevel = 'warn' // eslint-disable-line no-unused-vars\nlet loggerRef = null\nlet fakeLoggerRef = {\n currentLevel: 'warn',\n level: function debug(levelName) {\n if (levelName) {\n this.currentLevel = levelName\n }\n return this.currentLevel\n },\n debug: function debug(message) {\n if (this.currentLevel === 'debug') {\n console.log('runtime: ' + message)\n }\n },\n info: function info(message) {\n if (this.currentLevel === 'info' || this.currentLevel === 'debug') {\n console.info('runtime: ' + message)\n }\n },\n warn: function warning(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug'\n ) {\n console.warn('runtime: ' + message)\n }\n },\n error: function error(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug' ||\n this.currentLevel === 'error'\n ) {\n console.error('runtime: ' + message)\n }\n },\n}\n\n/**\n * @method getLogger\n * @return {_Logger} _Logger instance\n * @private\n * @description Get the _Logger instance\n */\nfunction getLogger() {\n let loggerId = ''\n let loggers = []\n let result = null\n\n if (!$metamodel.getModel('_Logger')) {\n result = fakeLoggerRef\n } else {\n loggers = $db.collections._Logger.find()\n if (loggers.length) {\n loggerId = loggers[0][$mson.ID]\n\n if ($component.get(loggerId)) {\n loggerRef = $component.get(loggerId)\n result = loggerRef\n } else {\n result = fakeLoggerRef\n }\n } else {\n result = fakeLoggerRef\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method level\n * @param {String} levelName name of the level\n * @description Set the level of the log\n */\nfunction level(levelName) {\n currentLevel = levelName\n}\n\n/**\n * @method unknownProperty\n * @param {String} propertyName the name of the property\n * @param {Object} schema the schema definition\n * @description A property of a schema is unknown\n */\nfunction unknownProperty(propertyName, schema) {\n let message = ''\n\n if (schema[$mson.NAME]) {\n message =\n \"unknown property '\" +\n propertyName +\n \"' for the definition of '\" +\n schema[$mson.NAME] +\n \"'\"\n } else {\n message = \"unknown property '\" + propertyName + \"' for a model\"\n }\n\n getLogger().warn(message)\n}\n\n/**\n * @method invalidPropertyType\n * @param {String} propertyName name of the peropety\n * @param {String} type the type defined by the schema\n * @param {String} property the property\n * @description Invalid type for a property\n */\nfunction invalidPropertyType(propertyName, type, property) {\n let realType =\n property && property.constructor\n ? property.constructor.name\n : typeof property\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidEnumValue\n * @param {Object} value the value\n * @param {String} type the type defined by the schema\n * @description Invalid value for type enum\n */\nfunction invalidEnumValue(value, type) {\n getLogger().warn(\n \"'\" + value + \"' is an invalid value for the type enum '\" + type + \"'\"\n )\n}\n\n/**\n * @method invalidClassName\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidClassName(componentId, type, constructorName) {\n getLogger().warn(\n \"invalid component '\" +\n componentId +\n \"' for a collection: expected a component of class '\" +\n type +\n \"' instead of '\" +\n constructorName +\n \"'\"\n )\n}\n\n/**\n * @method missingProperty\n * @param {String} propertyName name of the property\n * @description Missing a property\n */\nfunction missingProperty(propertyName) {\n getLogger().warn(\"property '\" + propertyName + \"' is missing\")\n}\n\n/**\n * @method missingImplementation\n * @param {String} name name of the missing schema\n * @description A class definition is missing\n */\nfunction missingImplementation(name) {\n getLogger().warn(\"schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method invalidTypeImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Invalid type for a property of a class definition\n */\nfunction invalidTypeImp(property, className) {\n getLogger().error(\n \"the property '\" + property + \"' of \" + className + ' model is invalid'\n )\n}\n\n/**\n * @method missingPropertyImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Missing a property for a class definition\n */\nfunction missingPropertyImp(property, className) {\n getLogger().warn(\n \"missing property '\" + property + \"' in the model '\" + className + \"'\"\n )\n}\n\n/**\n * @method unknownPropertyImp\n * @param {String} property a property\n * @param {Object} schema a schema\n * @description Unkown property for a class definition\n */\nfunction unknownPropertyImp(property, schema) {\n getLogger().error(\n \"the model '\" + schema + \"' has an unknown property '\" + property + \"'\"\n )\n}\n\n/**\n * @method invalidTypeDefinition\n * @param {String} name a type definition\n * @description Try to add an invalid type\n */\nfunction invalidTypeDefinition(name) {\n getLogger().warn(\"the type '\" + name + \"' is not valid\")\n}\n\n/**\n * @method invalidPropertyName\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type type defined by the schema\n * @description Invalid property name\n */\nfunction invalidPropertyName(id, className, propertyName, propertyValue, type) {\n let classInfo = ''\n let realType = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n if (typeof type === 'string') {\n realType =\n propertyValue && propertyValue.constructor\n ? propertyValue.constructor.name\n : typeof propertyValue\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n realType = type && type.constructor ? type.constructor.name : typeof type\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n classInfo +\n \": expected type 'string' instead of type '\" +\n realType +\n \"'\"\n )\n }\n}\n\n/**\n * @method readOnlyProperty\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @description Trying to set a read-only property\n */\nfunction readOnlyProperty(id, className, propertyName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"can not set read-only property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidDocumentOnDbInsert\n * @param {String} doc a document\n * @param {String} collectionName the name of the collection\n * @description Invalid document on a System Runtime database insert operation\n */\nfunction invalidDocumentOnDbInsert(doc, collectionName) {\n getLogger().warn(\n \"invalid document '\" +\n JSON.stringify(doc).replace(/,/g, ', ') +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidPropertyTypeOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} id id of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type expected type defined by the schema\n * @description Invalid property on a System Runtime database update operation\n */\nfunction invalidPropertyTypeOnDbUpdate(\n collectionName,\n id,\n propertyName,\n propertyValue,\n type\n) {\n getLogger().warn(\n \"invalid type for the property '\" +\n propertyName +\n \"' of the document '\" +\n id +\n \"' (\" +\n collectionName +\n \" collection) with the value '\" +\n JSON.stringify(propertyValue) +\n \"': expected type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownPropertyOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Unkonw property on a System Runtime database update operation\n */\nfunction unknownPropertyOnDbUpdate(propertyName, collectionName, id) {\n getLogger().warn(\n \"unknown property '\" +\n propertyName +\n \"' for document '\" +\n id +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method unknownMethod\n * @param {String} classId id of the class\n * @param {String} methodName name of the method\n * @description Call an unknown method of a class\n */\nfunction unknownMethod(classId, methodName) {\n getLogger().warn(\n \"try to call an unknown action '\" +\n methodName +\n \"' for the class '\" +\n classId +\n \"'\"\n )\n}\n\n/**\n * @method invalidCollectionName\n * @param {String} name name of the collection\n * @description Try to create an invalid DatabaseCollection\n */\nfunction invalidCollectionName(name) {\n getLogger().warn(\n \"invalid name for the collection '\" +\n name +\n \"': there is no schema '\" +\n name +\n \"'\"\n )\n}\n\n/**\n * @method invalidResultType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name ot the method\n * @param {String} expectedType expected type\n * @param {String} type current type\n * @description Invalid type result of a method\n */\nfunction invalidResultType(id, className, methodName, expectedType, type) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid type for the result of action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n expectedType +\n \"' instead of type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownComponent\n * @param {String} id id of the class\n * @param {String} componentId id of the component\n * @description Unknown class\n */\nfunction unknownComponent(className, componentId) {\n getLogger().warn(\n \"unkown class name '\" + className + \"' for component '\" + componentId + \"'\"\n )\n}\n\n/**\n * @method invalidParamNumber\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a method\n */\nfunction invalidParamNumber(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid number of parameters when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidParamType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @param {String} paramName name of the parameter\n * @description Invalid type parameters for a method\n */\nfunction invalidParamType(id, className, methodName, paramName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n if (paramName !== undefined) {\n getLogger().warn(\n \"invalid type for the parameter '\" +\n paramName +\n \"' when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n } else {\n getLogger().warn(\n \"invalid type for a parameter when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n }\n}\n\n/**\n * @method behaviorNotUnique\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Add a more than one behavior to a state\n */\nfunction behaviorNotUnique(id, stateName) {\n getLogger().warn(\n \"try to add more than one action for the state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOn\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Can not add a behavior with an invalid state\n */\nfunction invalidStateOn(id, stateName) {\n getLogger().warn(\n \"try to add an action to an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOff\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description The call to a remove state of the behavior module is invalid\n */\nfunction invalidStateOff(id, stateName) {\n getLogger().warn(\n \"try to remove an action from an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method masterSystemNotFound\n * @description The master system is not found\n */\nfunction masterSystemNotFound() {\n getLogger().warn('can not export the database because no system was defined')\n}\n\n/**\n * @method invalidType\n * @param {String} name name of the type\n * @param {String} value value of the type\n * @param {String} typeName expected type defined by the schema\n * @description Invalid type\n */\nfunction invalidType(name, value, typeName) {\n let realType =\n name && value.constructor ? value.constructor.name : typeof value\n\n getLogger().warn(\n \"invalid value for property '\" +\n name +\n \"': expected type '\" +\n typeName +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidConfiguration\n * @param {Object} obj an object\n * @param {String} type expected type for the configuration\n * @description Invalid class name\n */\nfunction invalidConfiguration(obj, type) {\n getLogger().warn(\n \"invalid type for '\" + JSON.stringify(obj) + \"': expected '\" + type + \"'\"\n )\n}\n\n/**\n * @method unknownType\n * @param {String} value value\n * @description Unknown type\n */\nfunction unknownType(value) {\n getLogger().warn(\"unknown type for value '\" + JSON.stringify(value) + \"'\")\n}\n\n/**\n * @method unknownPath\n * @param {String} path path\n * @param {String} path subpath\n * @description Unknown subpath in a path\n */\nfunction unknownPath(path, subpath) {\n getLogger().warn(\n \"the path '\" + path + \"' has an unkown subpath '\" + subpath + \"'\"\n )\n}\n\n/**\n * @method canNotYetValidate\n * @param {String} id id of the component\n * @param {String} className name of the class\n * @description A component has not been alreay validated\n */\nfunction canNotYetValidate(id, className) {\n getLogger().debug(\n \"can not yet validate if the document '\" +\n id +\n \"' is compliant with \" +\n className +\n ' model'\n )\n}\n\n/**\n * @method invalidChannelEvent\n * @param {String} message message send\n * @param {String} eventName name of the event\n * @param {String} type expected type\n * @description A message send by the channel is invalid\n */\nfunction invalidChannelEvent(message, eventName, type) {\n getLogger().warn(\n \"invalid type for the message '\" +\n JSON.stringify(message) +\n \"': expected type '\" +\n type +\n \"' for event '\" +\n eventName +\n \"'\"\n )\n}\n\n/**\n * @method invalidParamNumberMethodOn\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a behavior add with 'on' method\n */\nfunction invalidParamNumberMethodOn(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"invalid number of parameters when adding an action for the state '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method updateUuid\n * @param {String} currentId id of the component\n * @param {String} newId of the component\n * @param {Boolean} alreadyUsed newId already used\n * @description Change the id of a component\n */\nfunction updateUuid(currentId, newId, alreadyUsed) {\n if (alreadyUsed) {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"' that is already used\"\n )\n } else {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"'\"\n )\n }\n}\n\n/**\n * @method invalidUseOfComponent\n * @param {String} id id of the component\n * @description Try to change the state of a component that has been destroyed\n */\nfunction invalidUseOfComponent(id) {\n getLogger().warn(\n \"try to change the state of the destroyed component '\" + id + \"'\"\n )\n}\n\n/**\n * @method invalidSchema\n * @param {String} name name of the schema\n * @description Try to add an invalid schema\n */\nfunction invalidSchema(name) {\n getLogger().warn(\n \"the schema '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidModel\n * @param {String} name name of the model\n * @description Try to add an invalid model\n */\nfunction invalidModel(name) {\n getLogger().warn(\n \"the model '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidParameters\n * @param {String} classId class name of the component\n * @param {String} document document\n * @description Invalid parameters set when creating an instance of a class\n */\nfunction invalidParameters(classId, document) {\n let id = document && document._id ? document._id : ''\n\n getLogger().warn(\n \"the parameters for creating '\" +\n id +\n \"' component (\" +\n classId +\n ' model) are not compliant with the model'\n )\n}\n\n/**\n * @method destroyedComponentCall\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Try to get the property of a destroyed component\n */\nfunction destroyedComponentCall(propertyName, id) {\n getLogger().warn(\n \"trying to get the property '\" +\n propertyName +\n \"' on the destroyed component '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidConctructorParameters\n * @param {String} object configuration\n * @param {String} name schema name\n * @description Invalid parameter type when creating an instance of a class\n */\nfunction invalidConctructorParameters(object, name) {\n getLogger().warn(\n \"the constructor parameter '\" +\n JSON.stringify(object).replace(/,/g, ', ') +\n \"' for creating a component of class '\" +\n name +\n \"' is not an object\"\n )\n}\n\n/**\n * @method unknownModel\n * @param {String} classId id of the class\n * @description Get the information of an unkown model\n */\nfunction unknownModel(classId) {\n getLogger().warn(\"the model '\" + classId + \"' does not exist\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema\n * @description A schema is missing\n */\nfunction missingSchema(name) {\n getLogger().warn(\"the schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema where the cyclic dependency was found\n * @description A cyclic dependency was found\n */\nfunction cyclicDependency(name) {\n if (name) {\n getLogger().error(\n \"a cyclic inheritance dependency with the schema '\" +\n name +\n \"’ has been found, please check the '_inherit' property of this schema\"\n )\n } else {\n getLogger().error(\n \"a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas\"\n )\n }\n}\n\n/**\n * @method invalidEnumType\n * @param {Object} value the value\n * @param {String} typeName name of the type\n * @param {String} type typeName of the type\n * @description Invalid type for a type enum\n */\nfunction invalidEnumType(value, typeName, type) {\n let realType = ''\n\n if (typeof type !== 'undefined' && type !== typeof value) {\n realType =\n value && value.constructor ? value.constructor.name : typeof value\n getLogger().warn(\n \"invalid type for the type '\" +\n typeName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n getLogger().warn(\"invalid type for the type '\" + typeName + \"'\")\n }\n}\n\n/**\n * @method loadSchema\n * @param {String} name name of the schema\n * @description Load schema\n */\nfunction loadSchema(name) {\n getLogger().debug(\"load schema '\" + name + \"'\")\n}\n\n/**\n * @method loadModel\n * @param {String} name name of the model\n * @description Load model\n */\nfunction loadModel(name) {\n getLogger().debug(\"load model '\" + name + \"'\")\n}\n\n/**\n * @method loadType\n * @param {String} name name of the type\n * @description Load type\n */\nfunction loadType(name) {\n getLogger().debug(\"load type '\" + name + \"'\")\n}\n\n/**\n * @method generatingSchema\n * @param {String} name name of the schema\n * @description Generate schema\n */\nfunction generatingSchema(name) {\n getLogger().debug('generating ' + name + ' schema ...')\n}\n\n/**\n * @method checkModel\n * @param {String} name name of the model\n * @description Check model\n */\nfunction checkModel(name) {\n getLogger().debug('analyzing ' + name + ' model...')\n}\n\n/**\n * @method createClass\n * @param {String} name name of the class\n * @description Create class\n */\nfunction createClass(name) {\n getLogger().debug(name + ' class has been created')\n}\n\n/**\n * @method initDb\n * @description Init the database\n */\nfunction initDb() {\n getLogger().debug('initializing data store...')\n}\n\n/**\n * @method actionInvokeError\n * @param {String} state state\n * @param {String} id component id\n * @param {String} className component class name\n * @param {String} message\n * @description An error happened when invoking a behavior\n */\nfunction actionInvokeError(state, id, className, message) {\n if (className !== 'Function') {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"' (\" +\n className +\n ' class): ' +\n message\n )\n } else {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"': \" +\n message\n )\n }\n}\n\n/**\n * @method invalidSchemaPropertyName\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaPropertyName(name, propName) {\n getLogger().warn(\n \"invalid name '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': a property name can not begin with '_'\"\n )\n}\n\n/**\n * @method invalidSchemaProperty\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaProperty(name, propName) {\n getLogger().warn(\n \"invalid property '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': only 'property', 'link', 'collection', 'method' and 'event' are allowed\"\n )\n}\n\n/**\n * @method invalidPropertyFormat\n * @param {String} obj definition of a property\n * @description Invalid format for the definition of a property\n */\nfunction invalidPropertyFormat(obj) {\n getLogger().warn(\n \"invalid format for a definition of a property: '\" +\n obj +\n \"' is not an object\"\n )\n}\n\n/**\n * @method invalidState\n * @param {String} model name of the model\n * @param {String} state invalid state\n * @description Invalid state\n */\nfunction invalidState(model, state) {\n getLogger().warn(\n \"invalid state '\" + state + \"' for the model '\" + model + \"'\"\n )\n}\n\n/**\n * @method unknownContext\n * @param {String} className name of the class\n * @param {String} methodName name of the method\n * @description Invoke a method class without a context\n */\nfunction unknownContext(className, methodName) {\n getLogger().warn(\n \"invoke the action '\" +\n methodName +\n \"' on the class '\" +\n className +\n \"' without a valid context\"\n )\n}\n\n/**\n * @method historyDocumentInserted\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} document\n * @description Created document from history\n */\nfunction historyDocumentInserted(id, collectionName, doc) {\n getLogger().debug(\n \"Created component of id '\" +\n id +\n \"' ('\" +\n collectionName +\n \" collection) with document '\" +\n doc +\n \"'\"\n )\n}\n\n/**\n * @method historyDocumentRemoved\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @description Removed document from history\n */\nfunction historyDocumentRemoved(id, collectionName) {\n getLogger().debug(\n \"Destroyed component of id '\" + id + \"' (\" + collectionName + ' collection)'\n )\n}\n\n/**\n * @method historyDocumentUpdated\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} fieldName field name of the component\n * @param {String} value value of the field\n * @description Updated document from history\n */\nfunction historyDocumentUpdated(id, collectionName, fieldName, value) {\n getLogger().debug(\n \"Updated field '\" +\n fieldName +\n \"' of component of id '\" +\n id +\n \"' with value '\" +\n value +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidCollectionItem\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidCollectionItem(\n id,\n className,\n propertyName,\n propertyValue,\n type\n) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' for all items of the collection '\" +\n JSON.stringify(propertyValue) +\n \"'\"\n )\n}\n\nexport default {\n level,\n unknownProperty,\n invalidPropertyType,\n invalidEnumValue,\n invalidClassName,\n missingProperty,\n missingImplementation,\n invalidTypeImp,\n missingPropertyImp,\n unknownPropertyImp,\n invalidTypeDefinition,\n invalidPropertyName,\n readOnlyProperty,\n invalidDocumentOnDbInsert,\n invalidPropertyTypeOnDbUpdate,\n unknownPropertyOnDbUpdate,\n unknownMethod,\n invalidCollectionName,\n invalidResultType,\n unknownComponent,\n invalidParamNumber,\n invalidParamType,\n behaviorNotUnique,\n invalidStateOn,\n invalidStateOff,\n masterSystemNotFound,\n invalidType,\n invalidConfiguration,\n unknownType,\n unknownPath,\n canNotYetValidate,\n invalidChannelEvent,\n invalidParamNumberMethodOn,\n updateUuid,\n invalidUseOfComponent,\n invalidSchema,\n invalidModel,\n invalidParameters,\n destroyedComponentCall,\n invalidConctructorParameters,\n unknownModel,\n missingSchema,\n cyclicDependency,\n invalidEnumType,\n loadSchema,\n loadModel,\n loadType,\n generatingSchema,\n checkModel,\n createClass,\n initDb,\n actionInvokeError,\n invalidSchemaPropertyName,\n invalidSchemaProperty,\n invalidPropertyFormat,\n invalidState,\n unknownContext,\n historyDocumentInserted,\n historyDocumentRemoved,\n historyDocumentUpdated,\n invalidCollectionItem,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module helper\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions used by all the modules\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private property */\n\nlet runtimeRef = null\n\n/* Public method */\n\n/**\n * @method isRuntime\n * @returns {Boolean} true if a System Runtime instance exist\n * @description Check if a System Runtime instance exists\n */\nfunction isRuntime() {\n let result = false\n\n if ($db.collections._Runtime && $db.collections._Runtime.find().length) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method getRuntime\n * @returns {_Runtime} System Runtime instance\n * @description Get the System Runtime instance\n */\nfunction getRuntime() {\n let runtimeId = ''\n let search = $db.collections._Runtime.find()\n\n if (!runtimeRef && search[0]) {\n runtimeId = search[0][$mson.ID]\n runtimeRef = $component.get(runtimeId)\n }\n\n return runtimeRef\n}\n\n/**\n * @method isOnNode\n * @returns {Boolean} true if a System Runtime is running on node\n * @description Check if a System Runtime is running on node\n */\nfunction isOnNode() {\n let result = false\n\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n result = true\n }\n\n return result\n}\n\n/**\n * @method generateId\n * @returns {String} a uuid\n * @description Generate a uuid\n */\nfunction generateId() {\n // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n function gen() {\n return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (Math.random() * 16) | 0\n let v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n }\n\n // force the uuid to start with a letter\n function getPrefix() {\n let validPrefix = 'abcdef'\n return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length))\n }\n\n return getPrefix() + gen()\n}\n\nexport default {\n isRuntime,\n getRuntime,\n isOnNode,\n generateId,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module metamodel\n * @requires db\n * @requires log\n * @requires component\n * @requires workflow\n * @requires helper\n * @requires mson\n * @description This module manages System Runtime metamodel.\n * System Runtime metamodel loads schemas and types, analyzes them and\n * creates the component classes and related DatabaseCollections.\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\nimport $component from './component.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n}\n\n/* Private methods */\n\n/**\n * @method isInternalName\n * @param {String} name\n * @private\n * @description is name an internal name\n */\nfunction isInternalName(name) {\n let result = true\n\n if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {\n result = false\n }\n return result\n}\n\n/**\n * @method generateModels\n * @private\n * @description Generate the models\n */\nfunction generateModels() {\n let att = ''\n let name = ''\n let schemaName = ''\n let schema = {}\n let schemaDef = null\n let modelName = ''\n let modelParent = null\n let modelExt = null\n let modelDef = null\n let model = {}\n let mergedModel = {}\n let parents = []\n let length = 0\n let i = 0\n let j = 0\n let nbAncestors = 0\n let sortInheritTree = []\n\n // default values\n for (schemaName in store.generatedSchemas) {\n schema = store.generatedSchemas[schemaName]\n\n // set model internal properties\n model = {\n _name: schema[$mson.NAME],\n }\n\n // set _core\n if (typeof schema[$mson.CORE] !== 'undefined') {\n model[$mson.CORE] = schema[$mson.CORE]\n }\n\n // set inherit\n if (Array.isArray(schema[$mson.INHERIT])) {\n model[$mson.INHERIT] = schema[$mson.INHERIT]\n }\n\n // set class\n if (typeof schema[$mson.CLASS] !== 'undefined') {\n model[$mson.CLASS] = schema[$mson.CLASS]\n }\n\n // set description\n if (typeof schema[$mson.DESCRIPTION] !== 'undefined') {\n model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]\n }\n\n // check valid name\n for (att in schema) {\n if (!isInternalName(att) && att.indexOf('_') === 0) {\n $log.invalidSchemaPropertyName(schema[$mson.NAME], att)\n }\n }\n\n // set model default values\n for (att in schema) {\n switch (true) {\n case schema[att] === 'property':\n model[att] = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'link':\n model[att] = {\n type: '_Component',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'method':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n result: 'any',\n description: att,\n }\n break\n case schema[att] === 'event':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n description: att,\n }\n break\n case schema[att] === 'collection':\n model[att] = {\n type: ['_Component'],\n readOnly: false,\n mandatory: false,\n default: [],\n description: att,\n label: att,\n }\n break\n default:\n if (!isInternalName(att)) {\n $log.invalidSchemaProperty(schema[$mson.NAME], att)\n }\n break\n }\n }\n\n store.generatedModels[model[$mson.NAME]] = model\n }\n\n // models to override\n for (modelName in store.generatedModels) {\n model = store.generatedModels[modelName]\n name = model[$mson.NAME]\n modelExt = store.models[name]\n if (modelExt) {\n mergedModel = merge(modelExt, model)\n store.generatedModels[name] = mergedModel\n }\n }\n\n // inheritance\n sortInheritTree = sortInheritanceTree()\n\n nbAncestors = sortInheritTree.length\n for (i = 0; i < nbAncestors; i++) {\n modelName = sortInheritTree[i]\n model = store.generatedModels[modelName]\n\n if (model) {\n parents = getParents(modelName)\n parents.reverse()\n\n length = parents.length\n for (j = 0; j < length; j++) {\n name = parents[j]\n modelParent = store.generatedModels[name]\n if (modelParent) {\n mergedModel = merge(modelParent, model)\n store.generatedModels[modelName] = mergedModel\n }\n }\n\n // last inherit\n // is the overriden model\n modelExt = store.models[modelName]\n if (modelExt) {\n mergedModel = merge(modelExt, store.generatedModels[modelName])\n store.generatedModels[modelName] = mergedModel\n }\n }\n }\n\n // save\n for (schemaName in store.generatedSchemas) {\n schemaDef = store.generatedSchemas[schemaName]\n $db.collections._GeneratedSchema.insert(schemaDef)\n }\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n $db.collections._GeneratedModel.insert(modelDef)\n }\n}\n\n/**\n * @method loadInMemory\n * @private\n * @description Load schemas and types in memory\n */\nfunction loadInMemory() {\n let schemas = []\n let types = []\n let schema = null\n let model = {}\n let models = []\n let type = null\n let name = ''\n let inherit = ''\n let i = 0\n let length = 0\n\n // init store\n store.inheritance = {}\n store.inheritanceTree = {}\n store.schemas = {}\n store.generatedSchemas = {}\n store.models = {}\n store.generatedModels = {}\n store.states = {}\n store.type = {}\n\n // load schemas\n schemas = $db.collections._Schema.find({})\n\n length = schemas.length\n for (i = 0; i < length; i++) {\n schema = schemas[i]\n\n name = schema[$mson.NAME]\n inherit = schema[$mson.INHERIT]\n\n store.schemas[name] = schema\n if (inherit) {\n store.inheritance[name] = inherit\n }\n\n if (!schema[$mson.CORE]) {\n $log.loadSchema(name)\n }\n }\n\n // load models\n models = $db.collections._Model.find({})\n\n length = models.length\n for (i = 0; i < length; i++) {\n model = models[i]\n name = model[$mson.NAME]\n\n store.models[name] = model\n\n if (!model[$mson.CORE]) {\n $log.loadModel(name)\n }\n }\n\n // load types\n types = $db.collections._Type.find({})\n\n length = types.length\n for (i = 0; i < length; i++) {\n type = types[i]\n store.type[type.name] = type\n\n if (!type.core) {\n $log.loadType(type.name)\n }\n }\n}\n\n/**\n * @method createInheritanceTree\n * @private\n * @description Create the inheritance tree\n */\nfunction createInheritanceTree() {\n let name = ''\n let c3linerization = []\n let ancestors = []\n\n /**\n *\n * @param {Array} elts array of elts\n * @returns {Boolean} true if all the arrays are empty\n * @private\n * @description Check if we have finisehd to linerize\n */\n function _isEmpty(elts) {\n let i = 0\n let length = 0\n let result = true\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].length) {\n result = false\n }\n }\n return result\n }\n\n /**\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @private\n * @description Remove an elt from all the arrays\n */\n function _removeCandidate(elt, elts) {\n let i = 0\n let length = 0\n let arr = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) === 0) {\n arr = elts[i]\n arr.reverse()\n arr.pop()\n arr.reverse()\n elts[i] = arr\n }\n }\n }\n\n /**\n * @method _isCandidate\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @returns {Boolean} true if the element is a good candidate.\n * @private\n * @description Check the element is a good candidate\n */\n function _isCandidate(elt, elts) {\n let result = true\n let i = 0\n let length = 0\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) > 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"6.0.0-beta.4\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"6.0.0-beta.4\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"6.0.0-beta.4\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA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ACVtB,KAAQ,SACRC,WAAa,GAEd6V,MAAS,CACR9V,KAAQ,SACRC,WAAa,IAGfY,MAAQ,IAGVke,WAAc,CACbS,SAAY,CACXY,QAAW,CACVrgB,IAAO,YAGT+hB,UAAa,CACZC,GAAM,CACLhiB,IAAO,OAGTqC,QAAW,CACV4f,OAAU,CACTjiB,IAAO,SACPmB,MAAS,SAGX+gB,WAAc,CACbC,UAAa,CACZniB,IAAO,cAGT6I,SAAY,CACXuZ,QAAW,CACVpiB,IAAO,UACP2e,QAAW,iBAGb0D,SAAY,CACXC,QAAW,CACVtiB,IAAO,aAIVA,IAAO,oBDh0CRiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file diff --git a/dist/system-runtime.min.js b/dist/system-runtime.min.js index ee2014a..b796470 100644 --- a/dist/system-runtime.min.js +++ b/dist/system-runtime.min.js @@ -17,4 +17,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -"use strict";var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=R(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o=0.1.90" @@ -43,9 +42,8 @@ }, "node_modules/@cypress/request": { "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "dev": true, + "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -72,9 +70,8 @@ }, "node_modules/@cypress/xvfb": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", - "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^3.1.0", "lodash.once": "^4.1.1" @@ -82,18 +79,16 @@ }, "node_modules/@cypress/xvfb/node_modules/debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/@eslint/eslintrc": { "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -114,9 +109,8 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -128,9 +122,8 @@ }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -141,15 +134,13 @@ }, "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==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -161,27 +152,24 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -189,15 +177,13 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", "dev": true, + "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -205,9 +191,8 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -218,18 +203,16 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -240,9 +223,8 @@ }, "node_modules/@rollup/plugin-terser": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", - "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", "dev": true, + "license": "MIT", "dependencies": { "terser": "^5.15.1" }, @@ -260,33 +242,28 @@ }, "node_modules/@types/minimatch": { "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { "version": "14.18.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", - "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", - "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/yauzl": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" @@ -294,21 +271,18 @@ }, "node_modules/@zeit/schemas": { "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", - "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/accepts": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -319,9 +293,8 @@ }, "node_modules/acorn": { "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -331,18 +304,16 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/aggregate-error": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, + "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -353,9 +324,8 @@ }, "node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -369,27 +339,24 @@ }, "node_modules/ansi-align": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.1.0" } }, "node_modules/ansi-colors": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-escapes": { "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -402,9 +369,8 @@ }, "node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -414,18 +380,16 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -438,9 +402,8 @@ }, "node_modules/anymatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, + "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -451,8 +414,6 @@ }, "node_modules/arch": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true, "funding": [ { @@ -467,147 +428,129 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/arg": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/array-differ": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/array-each": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/array-slice": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/arrify": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/asn1": { "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } }, "node_modules/assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8" } }, "node_modules/assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/async": { "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/at-least-node": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, + "license": "ISC", "engines": { "node": ">= 4.0.0" } }, "node_modules/aws-sign2": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { @@ -622,43 +565,39 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } }, "node_modules/binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/blob-util": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/bluebird": { "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/boxen": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", - "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^7.0.0", @@ -678,9 +617,8 @@ }, "node_modules/boxen/node_modules/ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -690,9 +628,8 @@ }, "node_modules/boxen/node_modules/ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -702,9 +639,8 @@ }, "node_modules/boxen/node_modules/chalk": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", - "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -714,15 +650,13 @@ }, "node_modules/boxen/node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/boxen/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -737,9 +671,8 @@ }, "node_modules/boxen/node_modules/strip-ansi": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -752,9 +685,8 @@ }, "node_modules/boxen/node_modules/type-fest": { "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=12.20" }, @@ -764,9 +696,8 @@ }, "node_modules/boxen/node_modules/wrap-ansi": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -781,9 +712,8 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -791,9 +721,8 @@ }, "node_modules/braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, + "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -803,14 +732,11 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/buffer": { "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -826,6 +752,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -833,51 +760,45 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bytes": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/cachedir": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", - "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.16" }, @@ -887,15 +808,13 @@ }, "node_modules/caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/chai": { "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, + "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -911,9 +830,8 @@ }, "node_modules/chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -927,9 +845,8 @@ }, "node_modules/chalk-template": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", - "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.2" }, @@ -942,9 +859,8 @@ }, "node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -954,26 +870,22 @@ }, "node_modules/check-error": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/check-more-types": { "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/chokidar": { "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -981,6 +893,7 @@ "url": "https://paulmillr.com/funding/" } ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -999,9 +912,8 @@ }, "node_modules/chokidar/node_modules/glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -1011,24 +923,21 @@ }, "node_modules/ci-info": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/clean-stack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/cli-boxes": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1038,9 +947,8 @@ }, "node_modules/cli-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, + "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" }, @@ -1050,9 +958,8 @@ }, "node_modules/cli-table3": { "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, + "license": "MIT", "dependencies": { "string-width": "^4.2.0" }, @@ -1065,9 +972,8 @@ }, "node_modules/cli-truncate": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, + "license": "MIT", "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^5.0.0" @@ -1081,9 +987,8 @@ }, "node_modules/cli-truncate/node_modules/ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -1093,15 +998,13 @@ }, "node_modules/cli-truncate/node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cli-truncate/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -1116,9 +1019,8 @@ }, "node_modules/cli-truncate/node_modules/strip-ansi": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -1131,9 +1033,8 @@ }, "node_modules/clipboardy": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", - "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", "dev": true, + "license": "MIT", "dependencies": { "arch": "^2.2.0", "execa": "^5.1.1", @@ -1148,9 +1049,8 @@ }, "node_modules/clipboardy/node_modules/execa": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -1171,9 +1071,8 @@ }, "node_modules/clipboardy/node_modules/get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1183,18 +1082,16 @@ }, "node_modules/clipboardy/node_modules/human-signals": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -1203,9 +1100,8 @@ }, "node_modules/color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1215,30 +1111,26 @@ }, "node_modules/color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/colorette": { "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/colors": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.1.90" } }, "node_modules/combined-stream": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1248,27 +1140,24 @@ }, "node_modules/commander": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/common-tags": { "version": "1.8.2", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", - "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/compressible": { "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": ">= 1.43.0 < 2" }, @@ -1278,9 +1167,8 @@ }, "node_modules/compression": { "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, + "license": "MIT", "dependencies": { "accepts": "~1.3.5", "bytes": "3.0.0", @@ -1296,51 +1184,44 @@ }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/compression/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/compression/node_modules/safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/content-disposition": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1352,10 +1233,9 @@ }, "node_modules/cypress": { "version": "10.11.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", - "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "dependencies": { "@cypress/request": "^2.88.10", "@cypress/xvfb": "^1.2.4", @@ -1409,9 +1289,8 @@ }, "node_modules/dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1421,24 +1300,21 @@ }, "node_modules/dateformat": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/dayjs": { "version": "1.11.6", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", - "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -1453,9 +1329,8 @@ }, "node_modules/decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1465,9 +1340,8 @@ }, "node_modules/deep-eql": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, + "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -1477,51 +1351,45 @@ }, "node_modules/deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/deep-is": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/detect-file": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -1531,15 +1399,13 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ecc-jsbn": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, + "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -1547,24 +1413,21 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/end-of-stream": { "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, + "license": "MIT", "dependencies": { "once": "^1.4.0" } }, "node_modules/enquirer": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1" }, @@ -1574,18 +1437,16 @@ }, "node_modules/escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1595,9 +1456,8 @@ }, "node_modules/eslint": { "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, + "license": "MIT", "dependencies": { "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.11.6", @@ -1651,9 +1511,8 @@ }, "node_modules/eslint-plugin-mocha": { "version": "10.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", - "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", "dev": true, + "license": "MIT", "dependencies": { "eslint-utils": "^3.0.0", "rambda": "^7.1.0" @@ -1667,9 +1526,8 @@ }, "node_modules/eslint-scope": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1680,9 +1538,8 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -1698,27 +1555,24 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=10" } }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/espree": { "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", @@ -1733,9 +1587,8 @@ }, "node_modules/esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -1746,9 +1599,8 @@ }, "node_modules/esquery": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1758,9 +1610,8 @@ }, "node_modules/esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1770,33 +1621,29 @@ }, "node_modules/estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/eventemitter2": { "version": "6.4.7", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", - "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/execa": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -1817,9 +1664,8 @@ }, "node_modules/executable": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, + "license": "MIT", "dependencies": { "pify": "^2.2.0" }, @@ -1829,8 +1675,6 @@ }, "node_modules/exit": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -1838,9 +1682,8 @@ }, "node_modules/expand-tilde": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, + "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.1" }, @@ -1850,15 +1693,13 @@ }, "node_modules/extend": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/extract-zip": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -1876,63 +1717,55 @@ }, "node_modules/extsprintf": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, "engines": [ "node >=0.6.0" - ] + ], + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-url-parser": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", "dev": true, + "license": "MIT", "dependencies": { "punycode": "^1.3.2" } }, "node_modules/fastq": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, + "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/fd-slicer": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, + "license": "MIT", "dependencies": { "pend": "~1.2.0" } }, "node_modules/figures": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -1945,18 +1778,16 @@ }, "node_modules/figures/node_modules/escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -1966,9 +1797,8 @@ }, "node_modules/fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1978,9 +1808,8 @@ }, "node_modules/find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1994,8 +1823,6 @@ }, "node_modules/findup-sync": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", "dev": true, "dependencies": { "glob": "~5.0.0" @@ -2006,9 +1833,8 @@ }, "node_modules/findup-sync/node_modules/glob": { "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, + "license": "ISC", "dependencies": { "inflight": "^1.0.4", "inherits": "2", @@ -2022,9 +1848,8 @@ }, "node_modules/fined": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, + "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", "is-plain-object": "^2.0.3", @@ -2038,27 +1863,24 @@ }, "node_modules/flagged-respawn": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, + "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, "node_modules/flat-cache": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -2069,24 +1891,21 @@ }, "node_modules/flatted": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/for-in": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/for-own": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", "dev": true, + "license": "MIT", "dependencies": { "for-in": "^1.0.1" }, @@ -2096,18 +1915,16 @@ }, "node_modules/forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -2119,9 +1936,8 @@ }, "node_modules/fs-extra": { "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, + "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -2134,16 +1950,13 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "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" @@ -2154,33 +1967,29 @@ }, "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 + "dev": true, + "license": "MIT" }, "node_modules/get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "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": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-stream": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, + "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -2193,8 +2002,6 @@ }, "node_modules/getobject": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true, "engines": { "node": ">=10" @@ -2202,27 +2009,24 @@ }, "node_modules/getos": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", - "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, + "license": "MIT", "dependencies": { "async": "^3.2.0" } }, "node_modules/getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } }, "node_modules/glob": { "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2240,9 +2044,8 @@ }, "node_modules/glob-parent": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -2252,9 +2055,8 @@ }, "node_modules/global-dirs": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, + "license": "MIT", "dependencies": { "ini": "2.0.0" }, @@ -2267,9 +2069,8 @@ }, "node_modules/global-modules": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, + "license": "MIT", "dependencies": { "global-prefix": "^1.0.1", "is-windows": "^1.0.1", @@ -2281,9 +2082,8 @@ }, "node_modules/global-prefix": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, + "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", "homedir-polyfill": "^1.0.1", @@ -2297,15 +2097,13 @@ }, "node_modules/global-prefix/node_modules/ini": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/global-prefix/node_modules/which": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2315,9 +2113,8 @@ }, "node_modules/globals": { "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -2330,21 +2127,18 @@ }, "node_modules/graceful-fs": { "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/grapheme-splitter": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/grunt": { "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", "dev": true, + "license": "MIT", "dependencies": { "dateformat": "~3.0.3", "eventemitter2": "~0.4.13", @@ -2371,9 +2165,8 @@ }, "node_modules/grunt-cli": { "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", "dev": true, + "license": "MIT", "dependencies": { "grunt-known-options": "~2.0.0", "interpret": "~1.1.0", @@ -2390,9 +2183,8 @@ }, "node_modules/grunt-cli/node_modules/nopt": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, + "license": "ISC", "dependencies": { "abbrev": "1", "osenv": "^0.1.4" @@ -2403,9 +2195,8 @@ }, "node_modules/grunt-contrib-clean": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", - "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", "dev": true, + "license": "MIT", "dependencies": { "async": "^3.2.3", "rimraf": "^2.6.2" @@ -2419,9 +2210,8 @@ }, "node_modules/grunt-contrib-clean/node_modules/rimraf": { "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -2431,9 +2221,8 @@ }, "node_modules/grunt-contrib-concat": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", - "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.2", "source-map": "^0.5.3" @@ -2447,8 +2236,6 @@ }, "node_modules/grunt-json-merge": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", - "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", "dev": true, "dependencies": { "underscore": "^1.6.0", @@ -2463,18 +2250,16 @@ }, "node_modules/grunt-known-options": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/grunt-legacy-log": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, + "license": "MIT", "dependencies": { "colors": "~1.1.2", "grunt-legacy-log-utils": "~2.1.0", @@ -2487,9 +2272,8 @@ }, "node_modules/grunt-legacy-log-utils": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "~4.1.0", "lodash": "~4.17.19" @@ -2500,9 +2284,8 @@ }, "node_modules/grunt-legacy-util": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", "dev": true, + "license": "MIT", "dependencies": { "async": "~3.2.0", "exit": "~0.1.2", @@ -2518,24 +2301,21 @@ }, "node_modules/grunt/node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/grunt/node_modules/eventemitter2": { "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/grunt/node_modules/js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -2546,9 +2326,8 @@ }, "node_modules/grunt/node_modules/minimatch": { "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2558,15 +2337,13 @@ }, "node_modules/grunt/node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, + "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -2576,27 +2353,24 @@ }, "node_modules/has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, + "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/homedir-polyfill": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, + "license": "MIT", "dependencies": { "parse-passwd": "^1.0.0" }, @@ -2606,8 +2380,6 @@ }, "node_modules/hooker": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", "dev": true, "engines": { "node": "*" @@ -2615,9 +2387,8 @@ }, "node_modules/http-signature": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", @@ -2629,18 +2400,16 @@ }, "node_modules/human-signals": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=8.12.0" } }, "node_modules/husky": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true, + "license": "MIT", "bin": { "husky": "lib/bin.js" }, @@ -2653,9 +2422,8 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -2665,8 +2433,6 @@ }, "node_modules/ieee754": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { @@ -2681,22 +2447,21 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2710,27 +2475,24 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2738,30 +2500,26 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/ini": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/interpret": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-absolute": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, + "license": "MIT", "dependencies": { "is-relative": "^1.0.0", "is-windows": "^1.0.1" @@ -2772,9 +2530,8 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -2784,9 +2541,8 @@ }, "node_modules/is-ci": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, + "license": "MIT", "dependencies": { "ci-info": "^3.2.0" }, @@ -2796,9 +2552,8 @@ }, "node_modules/is-core-module": { "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, + "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -2808,9 +2563,8 @@ }, "node_modules/is-docker": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, + "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -2823,18 +2577,16 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -2844,9 +2596,8 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -2856,9 +2607,8 @@ }, "node_modules/is-installed-globally": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, + "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -2872,36 +2622,32 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-object": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -2911,9 +2657,8 @@ }, "node_modules/is-port-reachable": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", - "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -2923,9 +2668,8 @@ }, "node_modules/is-relative": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, + "license": "MIT", "dependencies": { "is-unc-path": "^1.0.0" }, @@ -2935,9 +2679,8 @@ }, "node_modules/is-stream": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -2947,15 +2690,13 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/is-unc-path": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, + "license": "MIT", "dependencies": { "unc-path-regex": "^0.1.2" }, @@ -2965,9 +2706,8 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2977,18 +2717,16 @@ }, "node_modules/is-windows": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-wsl": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, + "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -2998,36 +2736,31 @@ }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-sdsl": { "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -3037,39 +2770,33 @@ }, "node_modules/jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true + "dev": true, + "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/jsonfile": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, + "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -3079,12 +2806,11 @@ }, "node_modules/jsprim": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -3094,27 +2820,24 @@ }, "node_modules/kind-of": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/lazy-ass": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true, + "license": "MIT", "engines": { "node": "> 0.8" } }, "node_modules/levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -3125,9 +2848,8 @@ }, "node_modules/liftup": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", "dev": true, + "license": "MIT", "dependencies": { "extend": "^3.0.2", "findup-sync": "^4.0.0", @@ -3144,9 +2866,8 @@ }, "node_modules/liftup/node_modules/findup-sync": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, + "license": "MIT", "dependencies": { "detect-file": "^1.0.0", "is-glob": "^4.0.0", @@ -3159,18 +2880,16 @@ }, "node_modules/lilconfig": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/lint-staged": { "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", "dev": true, + "license": "MIT", "dependencies": { "cli-truncate": "^3.1.0", "colorette": "^2.0.17", @@ -3198,18 +2917,16 @@ }, "node_modules/lint-staged/node_modules/commander": { "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || >=14" } }, "node_modules/lint-staged/node_modules/execa": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", "dev": true, + "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.1", @@ -3230,9 +2947,8 @@ }, "node_modules/lint-staged/node_modules/get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -3242,27 +2958,24 @@ }, "node_modules/lint-staged/node_modules/human-signals": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.20.0" } }, "node_modules/lint-staged/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/lint-staged/node_modules/is-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -3272,9 +2985,8 @@ }, "node_modules/lint-staged/node_modules/listr2": { "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", "dev": true, + "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -3299,9 +3011,8 @@ }, "node_modules/lint-staged/node_modules/listr2/node_modules/cli-truncate": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, + "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -3315,9 +3026,8 @@ }, "node_modules/lint-staged/node_modules/mimic-fn": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -3327,9 +3037,8 @@ }, "node_modules/lint-staged/node_modules/npm-run-path": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^4.0.0" }, @@ -3342,9 +3051,8 @@ }, "node_modules/lint-staged/node_modules/onetime": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^4.0.0" }, @@ -3357,9 +3065,8 @@ }, "node_modules/lint-staged/node_modules/path-key": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -3369,9 +3076,8 @@ }, "node_modules/lint-staged/node_modules/slice-ansi": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -3383,9 +3089,8 @@ }, "node_modules/lint-staged/node_modules/strip-final-newline": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -3395,9 +3100,8 @@ }, "node_modules/listr2": { "version": "3.14.0", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", - "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, + "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -3422,9 +3126,8 @@ }, "node_modules/listr2/node_modules/cli-truncate": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, + "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -3438,18 +3141,16 @@ }, "node_modules/listr2/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/listr2/node_modules/slice-ansi": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -3461,9 +3162,8 @@ }, "node_modules/load-grunt-tasks": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", - "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", "dev": true, + "license": "MIT", "dependencies": { "arrify": "^2.0.1", "multimatch": "^4.0.0", @@ -3479,9 +3179,8 @@ }, "node_modules/locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -3494,27 +3193,23 @@ }, "node_modules/lodash": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.once": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -3528,9 +3223,8 @@ }, "node_modules/log-update": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", @@ -3546,18 +3240,16 @@ }, "node_modules/log-update/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/log-update/node_modules/slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -3572,9 +3264,8 @@ }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3586,18 +3277,16 @@ }, "node_modules/loupe": { "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", "dev": true, + "license": "MIT", "dependencies": { "get-func-name": "^2.0.0" } }, "node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -3607,9 +3296,8 @@ }, "node_modules/make-iterator": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, + "license": "MIT", "dependencies": { "kind-of": "^6.0.2" }, @@ -3619,24 +3307,21 @@ }, "node_modules/map-cache": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/micromatch": { "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -3647,18 +3332,16 @@ }, "node_modules/mime-db": { "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -3668,18 +3351,16 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3689,18 +3370,16 @@ }, "node_modules/minimist": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, + "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -3710,9 +3389,8 @@ }, "node_modules/mocha": { "version": "10.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", - "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -3750,18 +3428,16 @@ }, "node_modules/mocha/node_modules/ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3779,9 +3455,8 @@ }, "node_modules/mocha/node_modules/glob/node_modules/minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3791,9 +3466,8 @@ }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3803,30 +3477,26 @@ }, "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/multimatch": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/minimatch": "^3.0.3", "array-differ": "^3.0.0", @@ -3840,9 +3510,8 @@ }, "node_modules/nanoid": { "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3852,24 +3521,21 @@ }, "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/nopt": { "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, + "license": "ISC", "dependencies": { "abbrev": "1" }, @@ -3879,18 +3545,16 @@ }, "node_modules/normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-path": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -3900,18 +3564,16 @@ }, "node_modules/object-inspect": { "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true, + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.defaults": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", "dev": true, + "license": "MIT", "dependencies": { "array-each": "^1.0.1", "array-slice": "^1.0.0", @@ -3924,9 +3586,8 @@ }, "node_modules/object.map": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", "dev": true, + "license": "MIT", "dependencies": { "for-own": "^1.0.0", "make-iterator": "^1.0.0" @@ -3937,9 +3598,8 @@ }, "node_modules/object.pick": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, + "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -3949,27 +3609,24 @@ }, "node_modules/on-headers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/onetime": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, + "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -3982,9 +3639,8 @@ }, "node_modules/optionator": { "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -3999,27 +3655,24 @@ }, "node_modules/os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, + "license": "ISC", "dependencies": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -4027,15 +3680,13 @@ }, "node_modules/ospath": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", - "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -4048,9 +3699,8 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -4063,9 +3713,8 @@ }, "node_modules/p-map": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, + "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -4078,18 +3727,16 @@ }, "node_modules/p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -4099,9 +3746,8 @@ }, "node_modules/parse-filepath": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", "dev": true, + "license": "MIT", "dependencies": { "is-absolute": "^1.0.0", "map-cache": "^0.2.0", @@ -4113,57 +3759,50 @@ }, "node_modules/parse-passwd": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-is-inside": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true + "dev": true, + "license": "(WTFPL OR MIT)" }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "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 + "dev": true, + "license": "MIT" }, "node_modules/path-root": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", "dev": true, + "license": "MIT", "dependencies": { "path-root-regex": "^0.1.0" }, @@ -4173,45 +3812,39 @@ }, "node_modules/path-root-regex": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-to-regexp": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } }, "node_modules/pend": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/performance-now": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -4221,9 +3854,8 @@ }, "node_modules/pidtree": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true, + "license": "MIT", "bin": { "pidtree": "bin/pidtree.js" }, @@ -4233,18 +3865,16 @@ }, "node_modules/pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/pkg-up": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^3.0.0" }, @@ -4254,9 +3884,8 @@ }, "node_modules/pkg-up/node_modules/find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^3.0.0" }, @@ -4266,9 +3895,8 @@ }, "node_modules/pkg-up/node_modules/locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -4279,9 +3907,8 @@ }, "node_modules/pkg-up/node_modules/p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -4294,9 +3921,8 @@ }, "node_modules/pkg-up/node_modules/p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^2.0.0" }, @@ -4306,27 +3932,24 @@ }, "node_modules/pkg-up/node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -4339,9 +3962,8 @@ }, "node_modules/pretty-bytes": { "version": "5.6.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", - "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" }, @@ -4351,21 +3973,18 @@ }, "node_modules/proxy-from-env": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/psl": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pump": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4373,23 +3992,19 @@ }, "node_modules/punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/qs": { "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.6" } }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -4404,37 +4019,34 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/rambda": { "version": "7.3.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", - "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -4447,24 +4059,21 @@ }, "node_modules/rc/node_modules/ini": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/readdirp": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -4474,9 +4083,8 @@ }, "node_modules/rechoir": { "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, + "license": "MIT", "dependencies": { "resolve": "^1.9.0" }, @@ -4486,9 +4094,8 @@ }, "node_modules/regexpp": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -4498,9 +4105,8 @@ }, "node_modules/registry-auth-token": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, + "license": "MIT", "dependencies": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" @@ -4508,9 +4114,8 @@ }, "node_modules/registry-url": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", "dev": true, + "license": "MIT", "dependencies": { "rc": "^1.0.1" }, @@ -4520,36 +4125,32 @@ }, "node_modules/request-progress": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", - "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", "dev": true, + "license": "MIT", "dependencies": { "throttleit": "^1.0.0" } }, "node_modules/require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "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, + "license": "MIT", "dependencies": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -4564,9 +4165,8 @@ }, "node_modules/resolve-dir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, + "license": "MIT", "dependencies": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" @@ -4577,18 +4177,16 @@ }, "node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/resolve-pkg": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", - "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", "dev": true, + "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -4598,18 +4196,16 @@ }, "node_modules/resolve-pkg/node_modules/resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/restore-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, + "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -4620,9 +4216,8 @@ }, "node_modules/reusify": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, + "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -4630,15 +4225,13 @@ }, "node_modules/rfdc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, + "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -4651,9 +4244,8 @@ }, "node_modules/rollup": { "version": "3.2.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.5.tgz", - "integrity": "sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==", "dev": true, + "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -4667,8 +4259,6 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -4684,23 +4274,21 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/rxjs": { "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, + "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -4715,19 +4303,18 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/semver": { "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4740,18 +4327,16 @@ }, "node_modules/serialize-javascript": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/serve": { "version": "14.0.1", - "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", - "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", "dev": true, + "license": "MIT", "dependencies": { "@zeit/schemas": "2.21.0", "ajv": "8.11.0", @@ -4774,9 +4359,8 @@ }, "node_modules/serve-handler": { "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, + "license": "MIT", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -4790,18 +4374,16 @@ }, "node_modules/serve-handler/node_modules/mime-db": { "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/serve-handler/node_modules/mime-types": { "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "~1.33.0" }, @@ -4811,9 +4393,8 @@ }, "node_modules/serve-handler/node_modules/minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4823,9 +4404,8 @@ }, "node_modules/serve/node_modules/ajv": { "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -4839,9 +4419,8 @@ }, "node_modules/serve/node_modules/chalk": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", "dev": true, + "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -4851,15 +4430,13 @@ }, "node_modules/serve/node_modules/json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4869,24 +4446,21 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/signal-exit": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/slice-ansi": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" @@ -4900,9 +4474,8 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -4912,18 +4485,16 @@ }, "node_modules/source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, + "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -4931,24 +4502,21 @@ }, "node_modules/source-map-support/node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/sprintf-js": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/sshpk": { "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, + "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -4971,18 +4539,16 @@ }, "node_modules/string-argv": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.6.19" } }, "node_modules/string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -4994,18 +4560,16 @@ }, "node_modules/string-width/node_modules/is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5015,18 +4579,16 @@ }, "node_modules/strip-final-newline": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -5036,9 +4598,8 @@ }, "node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5051,9 +4612,8 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -5063,9 +4623,8 @@ }, "node_modules/terser": { "version": "5.15.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", - "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -5081,33 +4640,28 @@ }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/throttleit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tmp": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, + "license": "MIT", "dependencies": { "rimraf": "^3.0.0" }, @@ -5117,9 +4671,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -5129,9 +4682,8 @@ }, "node_modules/tough-cookie": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -5142,24 +4694,21 @@ }, "node_modules/tough-cookie/node_modules/punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tslib": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -5169,15 +4718,13 @@ }, "node_modules/tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true + "dev": true, + "license": "Unlicense" }, "node_modules/type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -5187,18 +4734,16 @@ }, "node_modules/type-detect": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -5208,30 +4753,26 @@ }, "node_modules/unc-path-regex": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/underscore": { "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/underscore-deep-extend": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/underscore-deep-extend/-/underscore-deep-extend-0.0.3.tgz", - "integrity": "sha512-Spmxxx7Oa5kDBgZADaod6TWZVVD/Pw//VrhgZcWdKP1h23HGEpQFuF/xjCT5A0NhsolJaCVewvCU3n/vBa6HDA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/underscore.string": { "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", "dev": true, + "license": "MIT", "dependencies": { "sprintf-js": "^1.1.1", "util-deprecate": "^1.0.2" @@ -5242,27 +4783,24 @@ }, "node_modules/universalify": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, + "license": "MIT", "engines": { "node": ">= 10.0.0" } }, "node_modules/untildify": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/update-check": { "version": "1.5.4", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", - "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", "dev": true, + "license": "MIT", "dependencies": { "registry-auth-token": "3.3.2", "registry-url": "3.1.0" @@ -5270,42 +4808,37 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/uri-js/node_modules/punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/uuid": { "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/v8flags": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", "dev": true, + "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.1" }, @@ -5315,21 +4848,19 @@ }, "node_modules/vary": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" ], + "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -5338,9 +4869,8 @@ }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -5353,9 +4883,8 @@ }, "node_modules/widest-line": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, + "license": "MIT", "dependencies": { "string-width": "^5.0.1" }, @@ -5368,9 +4897,8 @@ }, "node_modules/widest-line/node_modules/ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -5380,15 +4908,13 @@ }, "node_modules/widest-line/node_modules/emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/widest-line/node_modules/string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -5403,9 +4929,8 @@ }, "node_modules/widest-line/node_modules/strip-ansi": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -5418,24 +4943,21 @@ }, "node_modules/word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/workerpool": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5450,39 +4972,34 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yaml": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", - "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true, + "license": "ISC", "engines": { "node": ">= 14" } }, "node_modules/yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -5498,18 +5015,16 @@ }, "node_modules/yargs-parser": { "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, + "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -5522,9 +5037,8 @@ }, "node_modules/yargs-unparser/node_modules/camelcase": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -5534,9 +5048,8 @@ }, "node_modules/yauzl": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -5544,9 +5057,8 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -5558,15 +5070,11 @@ "dependencies": { "@colors/colors": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, "optional": true }, "@cypress/request": { "version": "2.88.10", - "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", - "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -5591,8 +5099,6 @@ }, "@cypress/xvfb": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", - "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, "requires": { "debug": "^3.1.0", @@ -5601,8 +5107,6 @@ "dependencies": { "debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -5612,8 +5116,6 @@ }, "@eslint/eslintrc": { "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5629,8 +5131,6 @@ }, "@humanwhocodes/config-array": { "version": "0.11.7", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", - "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -5640,20 +5140,14 @@ }, "@humanwhocodes/module-importer": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, "@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==", "dev": true }, "@jridgewell/gen-mapping": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", @@ -5663,20 +5157,14 @@ }, "@jridgewell/resolve-uri": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true }, "@jridgewell/set-array": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, "@jridgewell/source-map": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", @@ -5685,14 +5173,10 @@ }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "@jridgewell/trace-mapping": { "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", "dev": true, "requires": { "@jridgewell/resolve-uri": "3.1.0", @@ -5701,8 +5185,6 @@ }, "@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -5711,14 +5193,10 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -5727,8 +5205,6 @@ }, "@rollup/plugin-terser": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", - "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", "dev": true, "requires": { "terser": "^5.15.1" @@ -5736,32 +5212,22 @@ }, "@types/minimatch": { "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", "dev": true }, "@types/node": { "version": "14.18.33", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", - "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", "dev": true }, "@types/sinonjs__fake-timers": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", - "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", "dev": true }, "@types/sizzle": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", - "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", "dev": true }, "@types/yauzl": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, "optional": true, "requires": { @@ -5770,20 +5236,14 @@ }, "@zeit/schemas": { "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", - "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", "dev": true }, "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, "accepts": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { "mime-types": "~2.1.34", @@ -5792,21 +5252,15 @@ }, "acorn": { "version": "8.8.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, "aggregate-error": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { "clean-stack": "^2.0.0", @@ -5815,8 +5269,6 @@ }, "ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -5827,8 +5279,6 @@ }, "ansi-align": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, "requires": { "string-width": "^4.1.0" @@ -5836,14 +5286,10 @@ }, "ansi-colors": { "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-escapes": { "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "requires": { "type-fest": "^0.21.3" @@ -5851,22 +5297,16 @@ "dependencies": { "type-fest": { "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true } } }, "ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -5874,8 +5314,6 @@ }, "anymatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -5884,56 +5322,38 @@ }, "arch": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", - "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true }, "arg": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", "dev": true }, "argparse": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "array-differ": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true }, "array-each": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true }, "array-slice": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, "array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, "arrify": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true }, "asn1": { "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "requires": { "safer-buffer": "~2.1.0" @@ -5941,68 +5361,46 @@ }, "assert-plus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true }, "assertion-error": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, "astral-regex": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", "dev": true }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "at-least-node": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true }, "aws-sign2": { "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true }, "aws4": { "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, "balanced-match": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base64-js": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, "bcrypt-pbkdf": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "requires": { "tweetnacl": "^0.14.3" @@ -6010,26 +5408,18 @@ }, "binary-extensions": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "blob-util": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", - "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", "dev": true }, "bluebird": { "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, "boxen": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", - "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", "dev": true, "requires": { "ansi-align": "^3.0.1", @@ -6044,32 +5434,22 @@ "dependencies": { "ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true }, "chalk": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", - "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", "dev": true }, "emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { "eastasianwidth": "^0.2.0", @@ -6079,8 +5459,6 @@ }, "strip-ansi": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -6088,14 +5466,10 @@ }, "type-fest": { "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true }, "wrap-ansi": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", - "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", "dev": true, "requires": { "ansi-styles": "^6.1.0", @@ -6107,8 +5481,6 @@ }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -6117,8 +5489,6 @@ }, "braces": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" @@ -6126,14 +5496,10 @@ }, "browser-stdout": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "buffer": { "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { "base64-js": "^1.3.1", @@ -6142,50 +5508,34 @@ }, "buffer-crc32": { "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true }, "buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "bytes": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true }, "cachedir": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", - "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true }, "callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", - "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", "dev": true }, "caseless": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, "chai": { "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -6199,8 +5549,6 @@ }, "chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -6209,8 +5557,6 @@ "dependencies": { "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -6220,8 +5566,6 @@ }, "chalk-template": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", - "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", "dev": true, "requires": { "chalk": "^4.1.2" @@ -6229,20 +5573,14 @@ }, "check-error": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true }, "check-more-types": { "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true }, "chokidar": { "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -6257,8 +5595,6 @@ "dependencies": { "glob-parent": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -6268,26 +5604,18 @@ }, "ci-info": { "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", "dev": true }, "clean-stack": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, "cli-boxes": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", - "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "dev": true }, "cli-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "requires": { "restore-cursor": "^3.1.0" @@ -6295,8 +5623,6 @@ }, "cli-table3": { "version": "0.6.3", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", - "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, "requires": { "@colors/colors": "1.5.0", @@ -6305,8 +5631,6 @@ }, "cli-truncate": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, "requires": { "slice-ansi": "^5.0.0", @@ -6315,20 +5639,14 @@ "dependencies": { "ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { "eastasianwidth": "^0.2.0", @@ -6338,8 +5656,6 @@ }, "strip-ansi": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -6349,8 +5665,6 @@ }, "clipboardy": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", - "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", "dev": true, "requires": { "arch": "^2.2.0", @@ -6360,8 +5674,6 @@ "dependencies": { "execa": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "requires": { "cross-spawn": "^7.0.3", @@ -6377,22 +5689,16 @@ }, "get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, "human-signals": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true } } }, "cliui": { "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { "string-width": "^4.2.0", @@ -6402,8 +5708,6 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -6411,26 +5715,18 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "colorette": { "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, "colors": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", "dev": true }, "combined-stream": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { "delayed-stream": "~1.0.0" @@ -6438,20 +5734,14 @@ }, "commander": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, "common-tags": { "version": "1.8.2", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", - "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true }, "compressible": { "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { "mime-db": ">= 1.43.0 < 2" @@ -6459,8 +5749,6 @@ }, "compression": { "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, "requires": { "accepts": "~1.3.5", @@ -6474,8 +5762,6 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -6483,40 +5769,28 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true } } }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "content-disposition": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true }, "cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -6526,8 +5800,6 @@ }, "cypress": { "version": "10.11.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", - "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -6576,8 +5848,6 @@ }, "dashdash": { "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -6585,20 +5855,14 @@ }, "dateformat": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true }, "dayjs": { "version": "1.11.6", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", - "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", "dev": true }, "debug": { "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -6606,14 +5870,10 @@ }, "decamelize": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, "deep-eql": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -6621,38 +5881,26 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, "detect-file": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true }, "diff": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "doctrine": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -6660,14 +5908,10 @@ }, "eastasianwidth": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, "ecc-jsbn": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "requires": { "jsbn": "~0.1.0", @@ -6676,14 +5920,10 @@ }, "emoji-regex": { "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "end-of-stream": { "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" @@ -6691,8 +5931,6 @@ }, "enquirer": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { "ansi-colors": "^4.1.1" @@ -6700,20 +5938,14 @@ }, "escalade": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "eslint": { "version": "8.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", - "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", @@ -6759,8 +5991,6 @@ }, "eslint-plugin-mocha": { "version": "10.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", - "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", "dev": true, "requires": { "eslint-utils": "^3.0.0", @@ -6769,8 +5999,6 @@ }, "eslint-scope": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -6779,8 +6007,6 @@ }, "eslint-utils": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" @@ -6788,22 +6014,16 @@ "dependencies": { "eslint-visitor-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true } } }, "eslint-visitor-keys": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -6813,14 +6033,10 @@ }, "esprima": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -6828,8 +6044,6 @@ }, "esrecurse": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -6837,26 +6051,18 @@ }, "estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "eventemitter2": { "version": "6.4.7", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", - "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "execa": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -6872,8 +6078,6 @@ }, "executable": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", - "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "requires": { "pify": "^2.2.0" @@ -6881,14 +6085,10 @@ }, "exit": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, "expand-tilde": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, "requires": { "homedir-polyfill": "^1.0.1" @@ -6896,14 +6096,10 @@ }, "extend": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extract-zip": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "requires": { "@types/yauzl": "^2.9.1", @@ -6914,32 +6110,22 @@ }, "extsprintf": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true }, "fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "fast-url-parser": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", "dev": true, "requires": { "punycode": "^1.3.2" @@ -6947,8 +6133,6 @@ }, "fastq": { "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -6956,8 +6140,6 @@ }, "fd-slicer": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "requires": { "pend": "~1.2.0" @@ -6965,8 +6147,6 @@ }, "figures": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -6974,16 +6154,12 @@ "dependencies": { "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true } } }, "file-entry-cache": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -6991,8 +6167,6 @@ }, "fill-range": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -7000,8 +6174,6 @@ }, "find-up": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", @@ -7010,8 +6182,6 @@ }, "findup-sync": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", "dev": true, "requires": { "glob": "~5.0.0" @@ -7019,8 +6189,6 @@ "dependencies": { "glob": { "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, "requires": { "inflight": "^1.0.4", @@ -7034,8 +6202,6 @@ }, "fined": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -7047,20 +6213,14 @@ }, "flagged-respawn": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true }, "flat": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, "flat-cache": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { "flatted": "^3.1.0", @@ -7069,20 +6229,14 @@ }, "flatted": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "for-in": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true }, "for-own": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", "dev": true, "requires": { "for-in": "^1.0.1" @@ -7090,14 +6244,10 @@ }, "forever-agent": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true }, "form-data": { "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -7107,8 +6257,6 @@ }, "fs-extra": { "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { "at-least-node": "^1.0.0", @@ -7119,39 +6267,27 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "fsevents": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, "function-bind": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-func-name": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true }, "get-stream": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { "pump": "^3.0.0" @@ -7159,14 +6295,10 @@ }, "getobject": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true }, "getos": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", - "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, "requires": { "async": "^3.2.0" @@ -7174,8 +6306,6 @@ }, "getpass": { "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -7183,8 +6313,6 @@ }, "glob": { "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -7197,8 +6325,6 @@ }, "glob-parent": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { "is-glob": "^4.0.3" @@ -7206,8 +6332,6 @@ }, "global-dirs": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", - "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { "ini": "2.0.0" @@ -7215,8 +6339,6 @@ }, "global-modules": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -7226,8 +6348,6 @@ }, "global-prefix": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -7239,14 +6359,10 @@ "dependencies": { "ini": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "which": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -7256,8 +6372,6 @@ }, "globals": { "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7265,20 +6379,14 @@ }, "graceful-fs": { "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "grapheme-splitter": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, "grunt": { "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", "dev": true, "requires": { "dateformat": "~3.0.3", @@ -7300,8 +6408,6 @@ "dependencies": { "argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -7309,14 +6415,10 @@ }, "eventemitter2": { "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", "dev": true }, "js-yaml": { "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -7325,8 +6427,6 @@ }, "minimatch": { "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7334,16 +6434,12 @@ }, "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true } } }, "grunt-cli": { "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", "dev": true, "requires": { "grunt-known-options": "~2.0.0", @@ -7355,8 +6451,6 @@ "dependencies": { "nopt": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, "requires": { "abbrev": "1", @@ -7367,8 +6461,6 @@ }, "grunt-contrib-clean": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz", - "integrity": "sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA==", "dev": true, "requires": { "async": "^3.2.3", @@ -7377,8 +6469,6 @@ "dependencies": { "rimraf": { "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" @@ -7388,8 +6478,6 @@ }, "grunt-contrib-concat": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", - "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -7398,8 +6486,6 @@ }, "grunt-json-merge": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/grunt-json-merge/-/grunt-json-merge-0.2.2.tgz", - "integrity": "sha512-MUro7vbqCLEF9IxiFFwZrJ3B4rv5FuMrtDSzzBgVBJBphkS0g93K+ySgi8MnB/UhHp4n+jEUrufEin/OUf6wrw==", "dev": true, "requires": { "underscore": "^1.6.0", @@ -7408,14 +6494,10 @@ }, "grunt-known-options": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", "dev": true }, "grunt-legacy-log": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, "requires": { "colors": "~1.1.2", @@ -7426,8 +6508,6 @@ }, "grunt-legacy-log-utils": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, "requires": { "chalk": "~4.1.0", @@ -7436,8 +6516,6 @@ }, "grunt-legacy-util": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", "dev": true, "requires": { "async": "~3.2.0", @@ -7451,8 +6529,6 @@ }, "has": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" @@ -7460,20 +6536,14 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "he": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "homedir-polyfill": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, "requires": { "parse-passwd": "^1.0.0" @@ -7481,14 +6551,10 @@ }, "hooker": { "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", "dev": true }, "http-signature": { "version": "1.3.6", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", - "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -7498,20 +6564,14 @@ }, "human-signals": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, "husky": { "version": "8.0.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", - "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -7519,20 +6579,14 @@ }, "ieee754": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, "ignore": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -7541,20 +6595,14 @@ }, "imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true }, "indent-string": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -7563,26 +6611,18 @@ }, "inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "ini": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true }, "interpret": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", "dev": true }, "is-absolute": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { "is-relative": "^1.0.0", @@ -7591,8 +6631,6 @@ }, "is-binary-path": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { "binary-extensions": "^2.0.0" @@ -7600,8 +6638,6 @@ }, "is-ci": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "requires": { "ci-info": "^3.2.0" @@ -7609,8 +6645,6 @@ }, "is-core-module": { "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "requires": { "has": "^1.0.3" @@ -7618,26 +6652,18 @@ }, "is-docker": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true }, "is-extglob": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true }, "is-glob": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -7645,8 +6671,6 @@ }, "is-installed-globally": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { "global-dirs": "^3.0.0", @@ -7655,26 +6679,18 @@ }, "is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, "is-plain-obj": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "is-plain-object": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -7682,14 +6698,10 @@ }, "is-port-reachable": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", - "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", "dev": true }, "is-relative": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { "is-unc-path": "^1.0.0" @@ -7697,20 +6709,14 @@ }, "is-stream": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "is-typedarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, "is-unc-path": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { "unc-path-regex": "^0.1.2" @@ -7718,20 +6724,14 @@ }, "is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, "is-windows": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "is-wsl": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "requires": { "is-docker": "^2.0.0" @@ -7739,32 +6739,22 @@ }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, "isobject": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true }, "isstream": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, "js-sdsl": { "version": "4.1.5", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", - "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", "dev": true }, "js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -7772,38 +6762,26 @@ }, "jsbn": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, "json-schema": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, "jsonfile": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { "graceful-fs": "^4.1.6", @@ -7812,8 +6790,6 @@ }, "jsprim": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", - "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "requires": { "assert-plus": "1.0.0", @@ -7824,20 +6800,14 @@ }, "kind-of": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "lazy-ass": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true }, "levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { "prelude-ls": "^1.2.1", @@ -7846,8 +6816,6 @@ }, "liftup": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", "dev": true, "requires": { "extend": "^3.0.2", @@ -7862,8 +6830,6 @@ "dependencies": { "findup-sync": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, "requires": { "detect-file": "^1.0.0", @@ -7876,14 +6842,10 @@ }, "lilconfig": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", - "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true }, "lint-staged": { "version": "13.0.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", - "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", "dev": true, "requires": { "cli-truncate": "^3.1.0", @@ -7903,14 +6865,10 @@ "dependencies": { "commander": { "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", "dev": true }, "execa": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", - "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", "dev": true, "requires": { "cross-spawn": "^7.0.3", @@ -7926,32 +6884,22 @@ }, "get-stream": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, "human-signals": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true }, "listr2": { "version": "4.0.5", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", - "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", "dev": true, "requires": { "cli-truncate": "^2.1.0", @@ -7966,8 +6914,6 @@ "dependencies": { "cli-truncate": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "requires": { "slice-ansi": "^3.0.0", @@ -7978,14 +6924,10 @@ }, "mimic-fn": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true }, "npm-run-path": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, "requires": { "path-key": "^4.0.0" @@ -7993,8 +6935,6 @@ }, "onetime": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "requires": { "mimic-fn": "^4.0.0" @@ -8002,14 +6942,10 @@ }, "path-key": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true }, "slice-ansi": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -8019,16 +6955,12 @@ }, "strip-final-newline": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true } } }, "listr2": { "version": "3.14.0", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", - "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, "requires": { "cli-truncate": "^2.1.0", @@ -8043,8 +6975,6 @@ "dependencies": { "cli-truncate": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "requires": { "slice-ansi": "^3.0.0", @@ -8053,14 +6983,10 @@ }, "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "slice-ansi": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -8072,8 +6998,6 @@ }, "load-grunt-tasks": { "version": "5.1.0", - "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", - "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", "dev": true, "requires": { "arrify": "^2.0.1", @@ -8084,8 +7008,6 @@ }, "locate-path": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" @@ -8093,26 +7015,18 @@ }, "lodash": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.merge": { "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "lodash.once": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true }, "log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -8121,8 +7035,6 @@ }, "log-update": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, "requires": { "ansi-escapes": "^4.3.0", @@ -8133,14 +7045,10 @@ "dependencies": { "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "slice-ansi": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -8150,8 +7058,6 @@ }, "wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -8163,8 +7069,6 @@ }, "loupe": { "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", "dev": true, "requires": { "get-func-name": "^2.0.0" @@ -8172,8 +7076,6 @@ }, "lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -8181,8 +7083,6 @@ }, "make-iterator": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, "requires": { "kind-of": "^6.0.2" @@ -8190,20 +7090,14 @@ }, "map-cache": { "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true }, "merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, "micromatch": { "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { "braces": "^3.0.2", @@ -8212,14 +7106,10 @@ }, "mime-db": { "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { "mime-db": "1.52.0" @@ -8227,14 +7117,10 @@ }, "mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -8242,20 +7128,14 @@ }, "minimist": { "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true }, "mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, "mocha": { "version": "10.1.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", - "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "requires": { "ansi-colors": "4.1.1", @@ -8283,14 +7163,10 @@ "dependencies": { "ansi-colors": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "glob": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -8303,8 +7179,6 @@ "dependencies": { "minimatch": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -8314,8 +7188,6 @@ }, "minimatch": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -8323,8 +7195,6 @@ "dependencies": { "brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -8334,22 +7204,16 @@ }, "ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } }, "ms": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "multimatch": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", "dev": true, "requires": { "@types/minimatch": "^3.0.3", @@ -8361,26 +7225,18 @@ }, "nanoid": { "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "negotiator": { "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "nopt": { "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "requires": { "abbrev": "1" @@ -8388,14 +7244,10 @@ }, "normalize-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "npm-run-path": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { "path-key": "^3.0.0" @@ -8403,14 +7255,10 @@ }, "object-inspect": { "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true }, "object.defaults": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", "dev": true, "requires": { "array-each": "^1.0.1", @@ -8421,8 +7269,6 @@ }, "object.map": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", "dev": true, "requires": { "for-own": "^1.0.0", @@ -8431,8 +7277,6 @@ }, "object.pick": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -8440,14 +7284,10 @@ }, "on-headers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -8455,8 +7295,6 @@ }, "onetime": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -8464,8 +7302,6 @@ }, "optionator": { "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -8478,20 +7314,14 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { "os-homedir": "^1.0.0", @@ -8500,14 +7330,10 @@ }, "ospath": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", - "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", "dev": true }, "p-limit": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { "yocto-queue": "^0.1.0" @@ -8515,8 +7341,6 @@ }, "p-locate": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" @@ -8524,8 +7348,6 @@ }, "p-map": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "requires": { "aggregate-error": "^3.0.0" @@ -8533,14 +7355,10 @@ }, "p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -8548,8 +7366,6 @@ }, "parse-filepath": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", "dev": true, "requires": { "is-absolute": "^1.0.0", @@ -8559,44 +7375,30 @@ }, "parse-passwd": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true }, "path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-is-inside": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", "dev": true }, "path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "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 }, "path-root": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", "dev": true, "requires": { "path-root-regex": "^0.1.0" @@ -8604,56 +7406,38 @@ }, "path-root-regex": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true }, "path-to-regexp": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", "dev": true }, "pathval": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "pend": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true }, "performance-now": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "picomatch": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pidtree": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true }, "pkg-up": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", "dev": true, "requires": { "find-up": "^3.0.0" @@ -8661,8 +7445,6 @@ "dependencies": { "find-up": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -8670,8 +7452,6 @@ }, "locate-path": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -8680,8 +7460,6 @@ }, "p-limit": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -8689,8 +7467,6 @@ }, "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -8698,46 +7474,32 @@ }, "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true } } }, "prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, "pretty-bytes": { "version": "5.6.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", - "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true }, "proxy-from-env": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "dev": true }, "psl": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "pump": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -8746,32 +7508,22 @@ }, "punycode": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, "qs": { "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "rambda": { "version": "7.3.0", - "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", - "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", "dev": true }, "randombytes": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -8779,14 +7531,10 @@ }, "range-parser": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true }, "rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { "deep-extend": "^0.6.0", @@ -8797,22 +7545,16 @@ "dependencies": { "ini": { "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true } } }, "readdirp": { "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -8820,8 +7562,6 @@ }, "rechoir": { "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, "requires": { "resolve": "^1.9.0" @@ -8829,14 +7569,10 @@ }, "regexpp": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "registry-auth-token": { "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { "rc": "^1.1.6", @@ -8845,8 +7581,6 @@ }, "registry-url": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", "dev": true, "requires": { "rc": "^1.0.1" @@ -8854,8 +7588,6 @@ }, "request-progress": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", - "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", "dev": true, "requires": { "throttleit": "^1.0.0" @@ -8863,20 +7595,14 @@ }, "require-directory": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { "is-core-module": "^2.9.0", @@ -8886,8 +7612,6 @@ }, "resolve-dir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, "requires": { "expand-tilde": "^2.0.0", @@ -8896,14 +7620,10 @@ }, "resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve-pkg": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", - "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", "dev": true, "requires": { "resolve-from": "^5.0.0" @@ -8911,16 +7631,12 @@ "dependencies": { "resolve-from": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true } } }, "restore-cursor": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "requires": { "onetime": "^5.1.0", @@ -8929,20 +7645,14 @@ }, "reusify": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rfdc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", "dev": true }, "rimraf": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -8950,8 +7660,6 @@ }, "rollup": { "version": "3.2.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.5.tgz", - "integrity": "sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -8959,8 +7667,6 @@ }, "run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -8968,8 +7674,6 @@ }, "rxjs": { "version": "7.5.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", - "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -8977,20 +7681,14 @@ }, "safe-buffer": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "semver": { "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -8998,8 +7696,6 @@ }, "serialize-javascript": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -9007,8 +7703,6 @@ }, "serve": { "version": "14.0.1", - "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", - "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", "dev": true, "requires": { "@zeit/schemas": "2.21.0", @@ -9026,8 +7720,6 @@ "dependencies": { "ajv": { "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -9038,22 +7730,16 @@ }, "chalk": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", - "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", "dev": true }, "json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true } } }, "serve-handler": { "version": "6.1.3", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", - "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, "requires": { "bytes": "3.0.0", @@ -9068,14 +7754,10 @@ "dependencies": { "mime-db": { "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true }, "mime-types": { "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { "mime-db": "~1.33.0" @@ -9083,8 +7765,6 @@ }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -9094,8 +7774,6 @@ }, "shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { "shebang-regex": "^3.0.0" @@ -9103,20 +7781,14 @@ }, "shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "slice-ansi": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "requires": { "ansi-styles": "^6.0.0", @@ -9125,22 +7797,16 @@ "dependencies": { "ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true } } }, "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true }, "source-map-support": { "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -9149,22 +7815,16 @@ "dependencies": { "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "sprintf-js": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, "sshpk": { "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -9180,14 +7840,10 @@ }, "string-argv": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "dev": true }, "string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -9197,16 +7853,12 @@ "dependencies": { "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true } } }, "strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { "ansi-regex": "^5.0.1" @@ -9214,20 +7866,14 @@ }, "strip-final-newline": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, "strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -9235,14 +7881,10 @@ }, "supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, "terser": { "version": "5.15.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", - "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", @@ -9253,34 +7895,24 @@ "dependencies": { "commander": { "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true } } }, "text-table": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "throttleit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", "dev": true }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "tmp": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, "requires": { "rimraf": "^3.0.0" @@ -9288,8 +7920,6 @@ }, "to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -9297,8 +7927,6 @@ }, "tough-cookie": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { "psl": "^1.1.28", @@ -9307,22 +7935,16 @@ "dependencies": { "punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } }, "tslib": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", "dev": true }, "tunnel-agent": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -9330,14 +7952,10 @@ }, "tweetnacl": { "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { "prelude-ls": "^1.2.1" @@ -9345,38 +7963,26 @@ }, "type-detect": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "unc-path-regex": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", "dev": true }, "underscore": { "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, "underscore-deep-extend": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/underscore-deep-extend/-/underscore-deep-extend-0.0.3.tgz", - "integrity": "sha512-Spmxxx7Oa5kDBgZADaod6TWZVVD/Pw//VrhgZcWdKP1h23HGEpQFuF/xjCT5A0NhsolJaCVewvCU3n/vBa6HDA==", "dev": true }, "underscore.string": { "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", "dev": true, "requires": { "sprintf-js": "^1.1.1", @@ -9385,20 +7991,14 @@ }, "universalify": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, "untildify": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true }, "update-check": { "version": "1.5.4", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", - "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", "dev": true, "requires": { "registry-auth-token": "3.3.2", @@ -9407,8 +8007,6 @@ }, "uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -9416,28 +8014,20 @@ "dependencies": { "punycode": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "uuid": { "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "v8flags": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", "dev": true, "requires": { "homedir-polyfill": "^1.0.1" @@ -9445,14 +8035,10 @@ }, "vary": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, "verror": { "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -9462,8 +8048,6 @@ }, "which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -9471,8 +8055,6 @@ }, "widest-line": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", - "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, "requires": { "string-width": "^5.0.1" @@ -9480,20 +8062,14 @@ "dependencies": { "ansi-regex": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "emoji-regex": { "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { "eastasianwidth": "^0.2.0", @@ -9503,8 +8079,6 @@ }, "strip-ansi": { "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -9514,20 +8088,14 @@ }, "word-wrap": { "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "workerpool": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -9537,32 +8105,22 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "y18n": { "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yaml": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", - "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true }, "yargs": { "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -9576,14 +8134,10 @@ }, "yargs-parser": { "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { "camelcase": "^6.0.0", @@ -9594,16 +8148,12 @@ "dependencies": { "camelcase": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true } } }, "yauzl": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "requires": { "buffer-crc32": "~0.2.3", @@ -9612,8 +8162,6 @@ }, "yocto-queue": { "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } } diff --git a/package.json b/package.json index b390582..dd85484 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "system-runtime", - "version": "6.0.0-beta.3", + "version": "6.0.0-beta.4", "description": "A JavaScript library that runs systems", "homepage": "https://designfirst.io/systemruntime/", "keywords": [ @@ -32,7 +32,7 @@ "url": "https://github.com/design-first/system-runtime/issues" }, "scripts": { - "build": "grunt system && rollup --config rollup.config.js && rollup --config rollup.config.cjs.js && grunt licenses && prettier --write src/system.js", + "build": "grunt system && rollup --config rollup.config.js && rollup --config rollup.config.iife.js && grunt licenses && prettier --write src/system.js", "example": "serve", "prettier": "prettier --write src/", "lint": "eslint --ext .js src/", diff --git a/rollup.config.cjs.js b/rollup.config.iife.js similarity index 95% rename from rollup.config.cjs.js rename to rollup.config.iife.js index c2d4626..0522615 100644 --- a/rollup.config.cjs.js +++ b/rollup.config.iife.js @@ -24,7 +24,8 @@ export default { input: 'src/runtime.js', output: { file: 'dist/system-runtime.min.js', - format: 'cjs', + format: 'iife', + name: 'runtime', }, plugins: [terser()], } diff --git a/src/system.js b/src/system.js index b327285..5c2c75e 100644 --- a/src/system.js +++ b/src/system.js @@ -35,7 +35,7 @@ export default { system: { name: 'system-runtime', master: false, - version: '6.0.0-beta.2', + version: '6.0.0-beta.4', description: 'System Runtime', schemas: { '1ac07185641fa9f': { @@ -574,7 +574,7 @@ export default { type: 'string', readOnly: true, mandatory: true, - default: '6.0.0-beta.2', + default: '6.0.0-beta.4', }, system: { params: [ @@ -1368,7 +1368,7 @@ export default { _Runtime: { runtime: { _id: 'runtime', - version: '6.0.0-beta.2', + version: '6.0.0-beta.4', }, }, _History: { diff --git a/src/system/system-runtime.json b/src/system/system-runtime.json index 13030e2..25a4a0c 100644 --- a/src/system/system-runtime.json +++ b/src/system/system-runtime.json @@ -1,7 +1,7 @@ { "name": "system-runtime", "master": false, - "version": "6.0.0-beta.2", + "version": "6.0.0-beta.4", "description": "System Runtime", "schemas": { "1ac07185641fa9f": { @@ -379,7 +379,7 @@ "type": "string", "readOnly": true, "mandatory": true, - "default": "6.0.0-beta.2" + "default": "6.0.0-beta.4" }, "system": { "params": [{ "name": "params", "type": "any", "mandatory": false }], @@ -967,7 +967,7 @@ "_Database": { "db": { "_id": "db" } }, "_Logger": { "logger": { "_id": "logger", "level": "warn" } }, "_Metamodel": { "metamodel": { "_id": "metamodel" } }, - "_Runtime": { "runtime": { "_id": "runtime", "version": "6.0.0-beta.2" } }, + "_Runtime": { "runtime": { "_id": "runtime", "version": "6.0.0-beta.4" } }, "_History": { "history": { "_id": "history" } } }, "_id": "e89c617b6b15d24" From d9638965d71c7293e7e76c7c9c837fe84b235dd0 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 16:12:54 +0100 Subject: [PATCH 08/12] chore: clean code --- .gitignore | 1 - .npmignore | 1 - Gruntfile.cjs | 6 +- addons/README.md | 5 - dist/system-runtime.js.map | 2 +- package-lock.json | 2659 +++++++++++++++++++++++++++--------- package.json | 2 - src/system.js | 535 ++------ tasks/clean.json | 3 - tasks/concat.json | 2 +- tasks/json_merge.json | 6 - 11 files changed, 2099 insertions(+), 1123 deletions(-) delete mode 100644 addons/README.md delete mode 100644 tasks/clean.json delete mode 100644 tasks/json_merge.json diff --git a/.gitignore b/.gitignore index b03a68e..2804e9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -/build/ /node_modules/ *.log .DS_Store \ No newline at end of file diff --git a/.npmignore b/.npmignore index abc92f0..2675b9e 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,6 @@ /.github/ /.husky/ /.vscode/ -/build/ /cypress/ /example/ /src/banners/ diff --git a/Gruntfile.cjs b/Gruntfile.cjs index 7089397..16d281e 100644 --- a/Gruntfile.cjs +++ b/Gruntfile.cjs @@ -25,13 +25,11 @@ module.exports = (grunt) => { // init configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), - clean: grunt.file.readJSON('tasks/clean.json'), concat: grunt.file.readJSON('tasks/concat.json'), - json_merge: grunt.file.readJSON('tasks/json_merge.json'), }) - // build system - grunt.registerTask('system', ['clean', 'json_merge', 'concat:system']) + // create src/system.js file + grunt.registerTask('system', ['concat:system']) // add licenses grunt.registerTask('licenses', ['concat:licenses']) diff --git a/addons/README.md b/addons/README.md deleted file mode 100644 index 0247790..0000000 --- a/addons/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## System Runtime Addons - -You can update System Runtime core system by composing other systems with it. In that case, these systems are called **addons**. - -To compose a system with System Runtime core system, just copy and paste a system into the `/addons` directory and run `npm run build`. diff --git a/dist/system-runtime.js.map b/dist/system-runtime.js.map index d692528..db7b2d6 100644 --- a/dist/system-runtime.js.map +++ b/dist/system-runtime.js.map @@ -1 +1 @@ -{"version":3,"file":"system-runtime.js","sources":["../src/mson.js","../src/log.js","../src/helper.js","../src/metamodel.js","../src/behavior.js","../src/state.js","../src/history.js","../src/workflow.js","../src/component.js","../src/db.js","../src/runtime.js","../src/system.js"],"sourcesContent":["/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module mson\n * @description This module contains all the mson definition.\n */\n\nconst ID = '_id'\nconst NAME = '_name'\nconst DESCRIPTION = '_description'\nconst INHERIT = '_inherit'\nconst CLASS = '_class'\nconst CORE = '_core'\n\nconst INTERNAL_NAMES = [\n '_id',\n '_name',\n '_inherit',\n '_description',\n '_class',\n '_core',\n]\n\nconst PROPERTY_TYPE = 'property'\nconst COLLECTION_TYPE = 'collection'\nconst LINK_TYPE = 'link'\nconst METHOD_TYPE = 'method'\nconst EVENT_TYPE = 'event'\n\nconst INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']\n\nconst DEFAULT_TYPES = [\n 'boolean',\n 'string',\n 'number',\n 'object',\n 'function',\n 'array',\n 'date',\n 'any',\n]\n\nconst SCHEMA_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n default: ['_Component'],\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst MODEL_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst TYPE_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n name: {\n type: 'string',\n mandatory: true,\n },\n type: {\n type: 'string',\n mandatory: true,\n },\n schema: {\n type: 'object',\n mandatory: false,\n },\n value: {\n type: ['any'],\n mandatory: false,\n },\n core: {\n type: 'boolean',\n mandatory: false,\n },\n description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nexport default {\n ID,\n NAME,\n DESCRIPTION,\n INHERIT,\n CLASS,\n CORE,\n INTERNAL_NAMES,\n PROPERTY_TYPE,\n COLLECTION_TYPE,\n LINK_TYPE,\n METHOD_TYPE,\n EVENT_TYPE,\n INTERNAL_TYPES,\n DEFAULT_TYPES,\n SCHEMA_DEFINITION,\n MODEL_DEFINITION,\n TYPE_DEFINITION,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module log\n * @requires metamodel\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions that write a log\n */\n\nimport $metamodel from './metamodel.js'\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet currentLevel = 'warn' // eslint-disable-line no-unused-vars\nlet loggerRef = null\nlet fakeLoggerRef = {\n currentLevel: 'warn',\n level: function debug(levelName) {\n if (levelName) {\n this.currentLevel = levelName\n }\n return this.currentLevel\n },\n debug: function debug(message) {\n if (this.currentLevel === 'debug') {\n console.log('runtime: ' + message)\n }\n },\n info: function info(message) {\n if (this.currentLevel === 'info' || this.currentLevel === 'debug') {\n console.info('runtime: ' + message)\n }\n },\n warn: function warning(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug'\n ) {\n console.warn('runtime: ' + message)\n }\n },\n error: function error(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug' ||\n this.currentLevel === 'error'\n ) {\n console.error('runtime: ' + message)\n }\n },\n}\n\n/**\n * @method getLogger\n * @return {_Logger} _Logger instance\n * @private\n * @description Get the _Logger instance\n */\nfunction getLogger() {\n let loggerId = ''\n let loggers = []\n let result = null\n\n if (!$metamodel.getModel('_Logger')) {\n result = fakeLoggerRef\n } else {\n loggers = $db.collections._Logger.find()\n if (loggers.length) {\n loggerId = loggers[0][$mson.ID]\n\n if ($component.get(loggerId)) {\n loggerRef = $component.get(loggerId)\n result = loggerRef\n } else {\n result = fakeLoggerRef\n }\n } else {\n result = fakeLoggerRef\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method level\n * @param {String} levelName name of the level\n * @description Set the level of the log\n */\nfunction level(levelName) {\n currentLevel = levelName\n}\n\n/**\n * @method unknownProperty\n * @param {String} propertyName the name of the property\n * @param {Object} schema the schema definition\n * @description A property of a schema is unknown\n */\nfunction unknownProperty(propertyName, schema) {\n let message = ''\n\n if (schema[$mson.NAME]) {\n message =\n \"unknown property '\" +\n propertyName +\n \"' for the definition of '\" +\n schema[$mson.NAME] +\n \"'\"\n } else {\n message = \"unknown property '\" + propertyName + \"' for a model\"\n }\n\n getLogger().warn(message)\n}\n\n/**\n * @method invalidPropertyType\n * @param {String} propertyName name of the peropety\n * @param {String} type the type defined by the schema\n * @param {String} property the property\n * @description Invalid type for a property\n */\nfunction invalidPropertyType(propertyName, type, property) {\n let realType =\n property && property.constructor\n ? property.constructor.name\n : typeof property\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidEnumValue\n * @param {Object} value the value\n * @param {String} type the type defined by the schema\n * @description Invalid value for type enum\n */\nfunction invalidEnumValue(value, type) {\n getLogger().warn(\n \"'\" + value + \"' is an invalid value for the type enum '\" + type + \"'\"\n )\n}\n\n/**\n * @method invalidClassName\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidClassName(componentId, type, constructorName) {\n getLogger().warn(\n \"invalid component '\" +\n componentId +\n \"' for a collection: expected a component of class '\" +\n type +\n \"' instead of '\" +\n constructorName +\n \"'\"\n )\n}\n\n/**\n * @method missingProperty\n * @param {String} propertyName name of the property\n * @description Missing a property\n */\nfunction missingProperty(propertyName) {\n getLogger().warn(\"property '\" + propertyName + \"' is missing\")\n}\n\n/**\n * @method missingImplementation\n * @param {String} name name of the missing schema\n * @description A class definition is missing\n */\nfunction missingImplementation(name) {\n getLogger().warn(\"schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method invalidTypeImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Invalid type for a property of a class definition\n */\nfunction invalidTypeImp(property, className) {\n getLogger().error(\n \"the property '\" + property + \"' of \" + className + ' model is invalid'\n )\n}\n\n/**\n * @method missingPropertyImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Missing a property for a class definition\n */\nfunction missingPropertyImp(property, className) {\n getLogger().warn(\n \"missing property '\" + property + \"' in the model '\" + className + \"'\"\n )\n}\n\n/**\n * @method unknownPropertyImp\n * @param {String} property a property\n * @param {Object} schema a schema\n * @description Unkown property for a class definition\n */\nfunction unknownPropertyImp(property, schema) {\n getLogger().error(\n \"the model '\" + schema + \"' has an unknown property '\" + property + \"'\"\n )\n}\n\n/**\n * @method invalidTypeDefinition\n * @param {String} name a type definition\n * @description Try to add an invalid type\n */\nfunction invalidTypeDefinition(name) {\n getLogger().warn(\"the type '\" + name + \"' is not valid\")\n}\n\n/**\n * @method invalidPropertyName\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type type defined by the schema\n * @description Invalid property name\n */\nfunction invalidPropertyName(id, className, propertyName, propertyValue, type) {\n let classInfo = ''\n let realType = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n if (typeof type === 'string') {\n realType =\n propertyValue && propertyValue.constructor\n ? propertyValue.constructor.name\n : typeof propertyValue\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n realType = type && type.constructor ? type.constructor.name : typeof type\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n classInfo +\n \": expected type 'string' instead of type '\" +\n realType +\n \"'\"\n )\n }\n}\n\n/**\n * @method readOnlyProperty\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @description Trying to set a read-only property\n */\nfunction readOnlyProperty(id, className, propertyName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"can not set read-only property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidDocumentOnDbInsert\n * @param {String} doc a document\n * @param {String} collectionName the name of the collection\n * @description Invalid document on a System Runtime database insert operation\n */\nfunction invalidDocumentOnDbInsert(doc, collectionName) {\n getLogger().warn(\n \"invalid document '\" +\n JSON.stringify(doc).replace(/,/g, ', ') +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidPropertyTypeOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} id id of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type expected type defined by the schema\n * @description Invalid property on a System Runtime database update operation\n */\nfunction invalidPropertyTypeOnDbUpdate(\n collectionName,\n id,\n propertyName,\n propertyValue,\n type\n) {\n getLogger().warn(\n \"invalid type for the property '\" +\n propertyName +\n \"' of the document '\" +\n id +\n \"' (\" +\n collectionName +\n \" collection) with the value '\" +\n JSON.stringify(propertyValue) +\n \"': expected type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownPropertyOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Unkonw property on a System Runtime database update operation\n */\nfunction unknownPropertyOnDbUpdate(propertyName, collectionName, id) {\n getLogger().warn(\n \"unknown property '\" +\n propertyName +\n \"' for document '\" +\n id +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method unknownMethod\n * @param {String} classId id of the class\n * @param {String} methodName name of the method\n * @description Call an unknown method of a class\n */\nfunction unknownMethod(classId, methodName) {\n getLogger().warn(\n \"try to call an unknown action '\" +\n methodName +\n \"' for the class '\" +\n classId +\n \"'\"\n )\n}\n\n/**\n * @method invalidCollectionName\n * @param {String} name name of the collection\n * @description Try to create an invalid DatabaseCollection\n */\nfunction invalidCollectionName(name) {\n getLogger().warn(\n \"invalid name for the collection '\" +\n name +\n \"': there is no schema '\" +\n name +\n \"'\"\n )\n}\n\n/**\n * @method invalidResultType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name ot the method\n * @param {String} expectedType expected type\n * @param {String} type current type\n * @description Invalid type result of a method\n */\nfunction invalidResultType(id, className, methodName, expectedType, type) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid type for the result of action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n expectedType +\n \"' instead of type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownComponent\n * @param {String} id id of the class\n * @param {String} componentId id of the component\n * @description Unknown class\n */\nfunction unknownComponent(className, componentId) {\n getLogger().warn(\n \"unkown class name '\" + className + \"' for component '\" + componentId + \"'\"\n )\n}\n\n/**\n * @method invalidParamNumber\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a method\n */\nfunction invalidParamNumber(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid number of parameters when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidParamType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @param {String} paramName name of the parameter\n * @description Invalid type parameters for a method\n */\nfunction invalidParamType(id, className, methodName, paramName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n if (paramName !== undefined) {\n getLogger().warn(\n \"invalid type for the parameter '\" +\n paramName +\n \"' when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n } else {\n getLogger().warn(\n \"invalid type for a parameter when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n }\n}\n\n/**\n * @method behaviorNotUnique\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Add a more than one behavior to a state\n */\nfunction behaviorNotUnique(id, stateName) {\n getLogger().warn(\n \"try to add more than one action for the state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOn\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Can not add a behavior with an invalid state\n */\nfunction invalidStateOn(id, stateName) {\n getLogger().warn(\n \"try to add an action to an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOff\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description The call to a remove state of the behavior module is invalid\n */\nfunction invalidStateOff(id, stateName) {\n getLogger().warn(\n \"try to remove an action from an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method masterSystemNotFound\n * @description The master system is not found\n */\nfunction masterSystemNotFound() {\n getLogger().warn('can not export the database because no system was defined')\n}\n\n/**\n * @method invalidType\n * @param {String} name name of the type\n * @param {String} value value of the type\n * @param {String} typeName expected type defined by the schema\n * @description Invalid type\n */\nfunction invalidType(name, value, typeName) {\n let realType =\n name && value.constructor ? value.constructor.name : typeof value\n\n getLogger().warn(\n \"invalid value for property '\" +\n name +\n \"': expected type '\" +\n typeName +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidConfiguration\n * @param {Object} obj an object\n * @param {String} type expected type for the configuration\n * @description Invalid class name\n */\nfunction invalidConfiguration(obj, type) {\n getLogger().warn(\n \"invalid type for '\" + JSON.stringify(obj) + \"': expected '\" + type + \"'\"\n )\n}\n\n/**\n * @method unknownType\n * @param {String} value value\n * @description Unknown type\n */\nfunction unknownType(value) {\n getLogger().warn(\"unknown type for value '\" + JSON.stringify(value) + \"'\")\n}\n\n/**\n * @method unknownPath\n * @param {String} path path\n * @param {String} path subpath\n * @description Unknown subpath in a path\n */\nfunction unknownPath(path, subpath) {\n getLogger().warn(\n \"the path '\" + path + \"' has an unkown subpath '\" + subpath + \"'\"\n )\n}\n\n/**\n * @method canNotYetValidate\n * @param {String} id id of the component\n * @param {String} className name of the class\n * @description A component has not been alreay validated\n */\nfunction canNotYetValidate(id, className) {\n getLogger().debug(\n \"can not yet validate if the document '\" +\n id +\n \"' is compliant with \" +\n className +\n ' model'\n )\n}\n\n/**\n * @method invalidChannelEvent\n * @param {String} message message send\n * @param {String} eventName name of the event\n * @param {String} type expected type\n * @description A message send by the channel is invalid\n */\nfunction invalidChannelEvent(message, eventName, type) {\n getLogger().warn(\n \"invalid type for the message '\" +\n JSON.stringify(message) +\n \"': expected type '\" +\n type +\n \"' for event '\" +\n eventName +\n \"'\"\n )\n}\n\n/**\n * @method invalidParamNumberMethodOn\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a behavior add with 'on' method\n */\nfunction invalidParamNumberMethodOn(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"invalid number of parameters when adding an action for the state '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method updateUuid\n * @param {String} currentId id of the component\n * @param {String} newId of the component\n * @param {Boolean} alreadyUsed newId already used\n * @description Change the id of a component\n */\nfunction updateUuid(currentId, newId, alreadyUsed) {\n if (alreadyUsed) {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"' that is already used\"\n )\n } else {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"'\"\n )\n }\n}\n\n/**\n * @method invalidUseOfComponent\n * @param {String} id id of the component\n * @description Try to change the state of a component that has been destroyed\n */\nfunction invalidUseOfComponent(id) {\n getLogger().warn(\n \"try to change the state of the destroyed component '\" + id + \"'\"\n )\n}\n\n/**\n * @method invalidSchema\n * @param {String} name name of the schema\n * @description Try to add an invalid schema\n */\nfunction invalidSchema(name) {\n getLogger().warn(\n \"the schema '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidModel\n * @param {String} name name of the model\n * @description Try to add an invalid model\n */\nfunction invalidModel(name) {\n getLogger().warn(\n \"the model '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidParameters\n * @param {String} classId class name of the component\n * @param {String} document document\n * @description Invalid parameters set when creating an instance of a class\n */\nfunction invalidParameters(classId, document) {\n let id = document && document._id ? document._id : ''\n\n getLogger().warn(\n \"the parameters for creating '\" +\n id +\n \"' component (\" +\n classId +\n ' model) are not compliant with the model'\n )\n}\n\n/**\n * @method destroyedComponentCall\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Try to get the property of a destroyed component\n */\nfunction destroyedComponentCall(propertyName, id) {\n getLogger().warn(\n \"trying to get the property '\" +\n propertyName +\n \"' on the destroyed component '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidConctructorParameters\n * @param {String} object configuration\n * @param {String} name schema name\n * @description Invalid parameter type when creating an instance of a class\n */\nfunction invalidConctructorParameters(object, name) {\n getLogger().warn(\n \"the constructor parameter '\" +\n JSON.stringify(object).replace(/,/g, ', ') +\n \"' for creating a component of class '\" +\n name +\n \"' is not an object\"\n )\n}\n\n/**\n * @method unknownModel\n * @param {String} classId id of the class\n * @description Get the information of an unkown model\n */\nfunction unknownModel(classId) {\n getLogger().warn(\"the model '\" + classId + \"' does not exist\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema\n * @description A schema is missing\n */\nfunction missingSchema(name) {\n getLogger().warn(\"the schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema where the cyclic dependency was found\n * @description A cyclic dependency was found\n */\nfunction cyclicDependency(name) {\n if (name) {\n getLogger().error(\n \"a cyclic inheritance dependency with the schema '\" +\n name +\n \"’ has been found, please check the '_inherit' property of this schema\"\n )\n } else {\n getLogger().error(\n \"a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas\"\n )\n }\n}\n\n/**\n * @method invalidEnumType\n * @param {Object} value the value\n * @param {String} typeName name of the type\n * @param {String} type typeName of the type\n * @description Invalid type for a type enum\n */\nfunction invalidEnumType(value, typeName, type) {\n let realType = ''\n\n if (typeof type !== 'undefined' && type !== typeof value) {\n realType =\n value && value.constructor ? value.constructor.name : typeof value\n getLogger().warn(\n \"invalid type for the type '\" +\n typeName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n getLogger().warn(\"invalid type for the type '\" + typeName + \"'\")\n }\n}\n\n/**\n * @method loadSchema\n * @param {String} name name of the schema\n * @description Load schema\n */\nfunction loadSchema(name) {\n getLogger().debug(\"load schema '\" + name + \"'\")\n}\n\n/**\n * @method loadModel\n * @param {String} name name of the model\n * @description Load model\n */\nfunction loadModel(name) {\n getLogger().debug(\"load model '\" + name + \"'\")\n}\n\n/**\n * @method loadType\n * @param {String} name name of the type\n * @description Load type\n */\nfunction loadType(name) {\n getLogger().debug(\"load type '\" + name + \"'\")\n}\n\n/**\n * @method generatingSchema\n * @param {String} name name of the schema\n * @description Generate schema\n */\nfunction generatingSchema(name) {\n getLogger().debug('generating ' + name + ' schema ...')\n}\n\n/**\n * @method checkModel\n * @param {String} name name of the model\n * @description Check model\n */\nfunction checkModel(name) {\n getLogger().debug('analyzing ' + name + ' model...')\n}\n\n/**\n * @method createClass\n * @param {String} name name of the class\n * @description Create class\n */\nfunction createClass(name) {\n getLogger().debug(name + ' class has been created')\n}\n\n/**\n * @method initDb\n * @description Init the database\n */\nfunction initDb() {\n getLogger().debug('initializing data store...')\n}\n\n/**\n * @method actionInvokeError\n * @param {String} state state\n * @param {String} id component id\n * @param {String} className component class name\n * @param {String} message\n * @description An error happened when invoking a behavior\n */\nfunction actionInvokeError(state, id, className, message) {\n if (className !== 'Function') {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"' (\" +\n className +\n ' class): ' +\n message\n )\n } else {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"': \" +\n message\n )\n }\n}\n\n/**\n * @method invalidSchemaPropertyName\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaPropertyName(name, propName) {\n getLogger().warn(\n \"invalid name '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': a property name can not begin with '_'\"\n )\n}\n\n/**\n * @method invalidSchemaProperty\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaProperty(name, propName) {\n getLogger().warn(\n \"invalid property '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': only 'property', 'link', 'collection', 'method' and 'event' are allowed\"\n )\n}\n\n/**\n * @method invalidPropertyFormat\n * @param {String} obj definition of a property\n * @description Invalid format for the definition of a property\n */\nfunction invalidPropertyFormat(obj) {\n getLogger().warn(\n \"invalid format for a definition of a property: '\" +\n obj +\n \"' is not an object\"\n )\n}\n\n/**\n * @method invalidState\n * @param {String} model name of the model\n * @param {String} state invalid state\n * @description Invalid state\n */\nfunction invalidState(model, state) {\n getLogger().warn(\n \"invalid state '\" + state + \"' for the model '\" + model + \"'\"\n )\n}\n\n/**\n * @method unknownContext\n * @param {String} className name of the class\n * @param {String} methodName name of the method\n * @description Invoke a method class without a context\n */\nfunction unknownContext(className, methodName) {\n getLogger().warn(\n \"invoke the action '\" +\n methodName +\n \"' on the class '\" +\n className +\n \"' without a valid context\"\n )\n}\n\n/**\n * @method historyDocumentInserted\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} document\n * @description Created document from history\n */\nfunction historyDocumentInserted(id, collectionName, doc) {\n getLogger().debug(\n \"Created component of id '\" +\n id +\n \"' ('\" +\n collectionName +\n \" collection) with document '\" +\n doc +\n \"'\"\n )\n}\n\n/**\n * @method historyDocumentRemoved\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @description Removed document from history\n */\nfunction historyDocumentRemoved(id, collectionName) {\n getLogger().debug(\n \"Destroyed component of id '\" + id + \"' (\" + collectionName + ' collection)'\n )\n}\n\n/**\n * @method historyDocumentUpdated\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} fieldName field name of the component\n * @param {String} value value of the field\n * @description Updated document from history\n */\nfunction historyDocumentUpdated(id, collectionName, fieldName, value) {\n getLogger().debug(\n \"Updated field '\" +\n fieldName +\n \"' of component of id '\" +\n id +\n \"' with value '\" +\n value +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidCollectionItem\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidCollectionItem(\n id,\n className,\n propertyName,\n propertyValue,\n type\n) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' for all items of the collection '\" +\n JSON.stringify(propertyValue) +\n \"'\"\n )\n}\n\nexport default {\n level,\n unknownProperty,\n invalidPropertyType,\n invalidEnumValue,\n invalidClassName,\n missingProperty,\n missingImplementation,\n invalidTypeImp,\n missingPropertyImp,\n unknownPropertyImp,\n invalidTypeDefinition,\n invalidPropertyName,\n readOnlyProperty,\n invalidDocumentOnDbInsert,\n invalidPropertyTypeOnDbUpdate,\n unknownPropertyOnDbUpdate,\n unknownMethod,\n invalidCollectionName,\n invalidResultType,\n unknownComponent,\n invalidParamNumber,\n invalidParamType,\n behaviorNotUnique,\n invalidStateOn,\n invalidStateOff,\n masterSystemNotFound,\n invalidType,\n invalidConfiguration,\n unknownType,\n unknownPath,\n canNotYetValidate,\n invalidChannelEvent,\n invalidParamNumberMethodOn,\n updateUuid,\n invalidUseOfComponent,\n invalidSchema,\n invalidModel,\n invalidParameters,\n destroyedComponentCall,\n invalidConctructorParameters,\n unknownModel,\n missingSchema,\n cyclicDependency,\n invalidEnumType,\n loadSchema,\n loadModel,\n loadType,\n generatingSchema,\n checkModel,\n createClass,\n initDb,\n actionInvokeError,\n invalidSchemaPropertyName,\n invalidSchemaProperty,\n invalidPropertyFormat,\n invalidState,\n unknownContext,\n historyDocumentInserted,\n historyDocumentRemoved,\n historyDocumentUpdated,\n invalidCollectionItem,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module helper\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions used by all the modules\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private property */\n\nlet runtimeRef = null\n\n/* Public method */\n\n/**\n * @method isRuntime\n * @returns {Boolean} true if a System Runtime instance exist\n * @description Check if a System Runtime instance exists\n */\nfunction isRuntime() {\n let result = false\n\n if ($db.collections._Runtime && $db.collections._Runtime.find().length) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method getRuntime\n * @returns {_Runtime} System Runtime instance\n * @description Get the System Runtime instance\n */\nfunction getRuntime() {\n let runtimeId = ''\n let search = $db.collections._Runtime.find()\n\n if (!runtimeRef && search[0]) {\n runtimeId = search[0][$mson.ID]\n runtimeRef = $component.get(runtimeId)\n }\n\n return runtimeRef\n}\n\n/**\n * @method isOnNode\n * @returns {Boolean} true if a System Runtime is running on node\n * @description Check if a System Runtime is running on node\n */\nfunction isOnNode() {\n let result = false\n\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n result = true\n }\n\n return result\n}\n\n/**\n * @method generateId\n * @returns {String} a uuid\n * @description Generate a uuid\n */\nfunction generateId() {\n // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n function gen() {\n return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (Math.random() * 16) | 0\n let v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n }\n\n // force the uuid to start with a letter\n function getPrefix() {\n let validPrefix = 'abcdef'\n return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length))\n }\n\n return getPrefix() + gen()\n}\n\nexport default {\n isRuntime,\n getRuntime,\n isOnNode,\n generateId,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module metamodel\n * @requires db\n * @requires log\n * @requires component\n * @requires workflow\n * @requires helper\n * @requires mson\n * @description This module manages System Runtime metamodel.\n * System Runtime metamodel loads schemas and types, analyzes them and\n * creates the component classes and related DatabaseCollections.\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\nimport $component from './component.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n}\n\n/* Private methods */\n\n/**\n * @method isInternalName\n * @param {String} name\n * @private\n * @description is name an internal name\n */\nfunction isInternalName(name) {\n let result = true\n\n if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {\n result = false\n }\n return result\n}\n\n/**\n * @method generateModels\n * @private\n * @description Generate the models\n */\nfunction generateModels() {\n let att = ''\n let name = ''\n let schemaName = ''\n let schema = {}\n let schemaDef = null\n let modelName = ''\n let modelParent = null\n let modelExt = null\n let modelDef = null\n let model = {}\n let mergedModel = {}\n let parents = []\n let length = 0\n let i = 0\n let j = 0\n let nbAncestors = 0\n let sortInheritTree = []\n\n // default values\n for (schemaName in store.generatedSchemas) {\n schema = store.generatedSchemas[schemaName]\n\n // set model internal properties\n model = {\n _name: schema[$mson.NAME],\n }\n\n // set _core\n if (typeof schema[$mson.CORE] !== 'undefined') {\n model[$mson.CORE] = schema[$mson.CORE]\n }\n\n // set inherit\n if (Array.isArray(schema[$mson.INHERIT])) {\n model[$mson.INHERIT] = schema[$mson.INHERIT]\n }\n\n // set class\n if (typeof schema[$mson.CLASS] !== 'undefined') {\n model[$mson.CLASS] = schema[$mson.CLASS]\n }\n\n // set description\n if (typeof schema[$mson.DESCRIPTION] !== 'undefined') {\n model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]\n }\n\n // check valid name\n for (att in schema) {\n if (!isInternalName(att) && att.indexOf('_') === 0) {\n $log.invalidSchemaPropertyName(schema[$mson.NAME], att)\n }\n }\n\n // set model default values\n for (att in schema) {\n switch (true) {\n case schema[att] === 'property':\n model[att] = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'link':\n model[att] = {\n type: '_Component',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'method':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n result: 'any',\n description: att,\n }\n break\n case schema[att] === 'event':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n description: att,\n }\n break\n case schema[att] === 'collection':\n model[att] = {\n type: ['_Component'],\n readOnly: false,\n mandatory: false,\n default: [],\n description: att,\n label: att,\n }\n break\n default:\n if (!isInternalName(att)) {\n $log.invalidSchemaProperty(schema[$mson.NAME], att)\n }\n break\n }\n }\n\n store.generatedModels[model[$mson.NAME]] = model\n }\n\n // models to override\n for (modelName in store.generatedModels) {\n model = store.generatedModels[modelName]\n name = model[$mson.NAME]\n modelExt = store.models[name]\n if (modelExt) {\n mergedModel = merge(modelExt, model)\n store.generatedModels[name] = mergedModel\n }\n }\n\n // inheritance\n sortInheritTree = sortInheritanceTree()\n\n nbAncestors = sortInheritTree.length\n for (i = 0; i < nbAncestors; i++) {\n modelName = sortInheritTree[i]\n model = store.generatedModels[modelName]\n\n if (model) {\n parents = getParents(modelName)\n parents.reverse()\n\n length = parents.length\n for (j = 0; j < length; j++) {\n name = parents[j]\n modelParent = store.generatedModels[name]\n if (modelParent) {\n mergedModel = merge(modelParent, model)\n store.generatedModels[modelName] = mergedModel\n }\n }\n\n // last inherit\n // is the overriden model\n modelExt = store.models[modelName]\n if (modelExt) {\n mergedModel = merge(modelExt, store.generatedModels[modelName])\n store.generatedModels[modelName] = mergedModel\n }\n }\n }\n\n // save\n for (schemaName in store.generatedSchemas) {\n schemaDef = store.generatedSchemas[schemaName]\n $db.collections._GeneratedSchema.insert(schemaDef)\n }\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n $db.collections._GeneratedModel.insert(modelDef)\n }\n}\n\n/**\n * @method loadInMemory\n * @private\n * @description Load schemas and types in memory\n */\nfunction loadInMemory() {\n let schemas = []\n let types = []\n let schema = null\n let model = {}\n let models = []\n let type = null\n let name = ''\n let inherit = ''\n let i = 0\n let length = 0\n\n // init store\n store.inheritance = {}\n store.inheritanceTree = {}\n store.schemas = {}\n store.generatedSchemas = {}\n store.models = {}\n store.generatedModels = {}\n store.states = {}\n store.type = {}\n\n // load schemas\n schemas = $db.collections._Schema.find({})\n\n length = schemas.length\n for (i = 0; i < length; i++) {\n schema = schemas[i]\n\n name = schema[$mson.NAME]\n inherit = schema[$mson.INHERIT]\n\n store.schemas[name] = schema\n if (inherit) {\n store.inheritance[name] = inherit\n }\n\n if (!schema[$mson.CORE]) {\n $log.loadSchema(name)\n }\n }\n\n // load models\n models = $db.collections._Model.find({})\n\n length = models.length\n for (i = 0; i < length; i++) {\n model = models[i]\n name = model[$mson.NAME]\n\n store.models[name] = model\n\n if (!model[$mson.CORE]) {\n $log.loadModel(name)\n }\n }\n\n // load types\n types = $db.collections._Type.find({})\n\n length = types.length\n for (i = 0; i < length; i++) {\n type = types[i]\n store.type[type.name] = type\n\n if (!type.core) {\n $log.loadType(type.name)\n }\n }\n}\n\n/**\n * @method createInheritanceTree\n * @private\n * @description Create the inheritance tree\n */\nfunction createInheritanceTree() {\n let name = ''\n let c3linerization = []\n let ancestors = []\n\n /**\n *\n * @param {Array} elts array of elts\n * @returns {Boolean} true if all the arrays are empty\n * @private\n * @description Check if we have finisehd to linerize\n */\n function _isEmpty(elts) {\n let i = 0\n let length = 0\n let result = true\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].length) {\n result = false\n }\n }\n return result\n }\n\n /**\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @private\n * @description Remove an elt from all the arrays\n */\n function _removeCandidate(elt, elts) {\n let i = 0\n let length = 0\n let arr = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) === 0) {\n arr = elts[i]\n arr.reverse()\n arr.pop()\n arr.reverse()\n elts[i] = arr\n }\n }\n }\n\n /**\n * @method _isCandidate\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @returns {Boolean} true if the element is a good candidate.\n * @private\n * @description Check the element is a good candidate\n */\n function _isCandidate(elt, elts) {\n let result = true\n let i = 0\n let length = 0\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) > 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n\t\"name\": \"system-runtime\",\n\t\"master\": false,\n\t\"version\": \"6.0.0-beta.4\",\n\t\"description\": \"System Runtime\",\n\t\"schemas\": {\n\t\t\"1ac07185641fa9f\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"core\": \"property\",\n\t\t\t\"component\": \"property\",\n\t\t\t\"action\": \"property\",\n\t\t\t\"state\": \"property\",\n\t\t\t\"useCoreAPI\": \"property\",\n\t\t\t\"context\": \"property\",\n\t\t\t\"_id\": \"1ac07185641fa9f\"\n\t\t},\n\t\t\"104ad1f48518376\": {\n\t\t\t\"_id\": \"104ad1f48518376\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"send\": \"event\",\n\t\t\t\"$systemInstalled\": \"event\",\n\t\t\t\"$systemResolved\": \"event\",\n\t\t\t\"$systemStarted\": \"event\",\n\t\t\t\"$systemStopped\": \"event\",\n\t\t\t\"$systemUninstalled\": \"event\"\n\t\t},\n\t\t\"111df11e2b19fde\": {\n\t\t\t\"_id\": \"111df11e2b19fde\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_inherit\": [],\n\t\t\t\"_core\": true,\n\t\t\t\"on\": \"method\",\n\t\t\t\"off\": \"method\",\n\t\t\t\"require\": \"method\",\n\t\t\t\"destroy\": \"method\",\n\t\t\t\"init\": \"method\",\n\t\t\t\"error\": \"event\"\n\t\t},\n\t\t\"1723516a30132ac\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": \"method\",\n\t\t\t\"insert\": \"event\",\n\t\t\t\"update\": \"event\",\n\t\t\t\"remove\": \"event\",\n\t\t\t\"_id\": \"1723516a30132ac\"\n\t\t},\n\t\t\"1268f1dddd1fea7\": {\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": \"property\",\n\t\t\t\"debug\": \"method\",\n\t\t\t\"info\": \"method\",\n\t\t\t\"warn\": \"method\",\n\t\t\t\"error\": \"method\",\n\t\t\t\"_id\": \"1268f1dddd1fea7\"\n\t\t},\n\t\t\"14caa1c46414ee1\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"event\": \"property\",\n\t\t\t\"from\": \"property\",\n\t\t\t\"data\": \"property\",\n\t\t\t\"_id\": \"14caa1c46414ee1\"\n\t\t},\n\t\t\"193f1166eb16609\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": \"method\",\n\t\t\t\"model\": \"method\",\n\t\t\t\"type\": \"method\",\n\t\t\t\"create\": \"method\",\n\t\t\t\"_id\": \"193f1166eb16609\"\n\t\t},\n\t\t\"157931f7a31b61d\": {\n\t\t\t\"_id\": \"157931f7a31b61d\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"install\": \"method\",\n\t\t\t\"uninstall\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"status\": \"method\",\n\t\t\t\"bundle\": \"method\"\n\t\t},\n\t\t\"12e211d4cd120a6\": {\n\t\t\t\"_id\": \"12e211d4cd120a6\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_OSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"version\": \"property\",\n\t\t\t\"system\": \"method\",\n\t\t\t\"message\": \"method\",\n\t\t\t\"ready\": \"event\"\n\t\t},\n\t\t\"1cb761fa4510dca\": {\n\t\t\t\"_id\": \"1cb761fa4510dca\",\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_SystemOSGi\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"name\": \"property\",\n\t\t\t\"master\": \"property\",\n\t\t\t\"version\": \"property\",\n\t\t\t\"description\": \"property\",\n\t\t\t\"schemas\": \"property\",\n\t\t\t\"models\": \"property\",\n\t\t\t\"behaviors\": \"property\",\n\t\t\t\"types\": \"property\",\n\t\t\t\"components\": \"property\"\n\t\t},\n\t\t\"145fe10c7514298\": {\n\t\t\t\"_id\": \"145fe10c7514298\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"_core\": true,\n\t\t\t\"state\": \"property\",\n\t\t\t\"location\": \"property\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\"\n\t\t},\n\t\t\"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n\t\t\t\"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_core\": true,\n\t\t\t\"_inherit\": [\n\t\t\t\t\"_Component\"\n\t\t\t],\n\t\t\t\"back\": \"method\",\n\t\t\t\"forward\": \"method\",\n\t\t\t\"from\": \"method\",\n\t\t\t\"dump\": \"method\",\n\t\t\t\"get\": \"method\",\n\t\t\t\"load\": \"method\",\n\t\t\t\"start\": \"method\",\n\t\t\t\"stop\": \"method\",\n\t\t\t\"clear\": \"method\"\n\t\t}\n\t},\n\t\"models\": {\n\t\t\"166971fd9d107fd\": {\n\t\t\t\"_name\": \"_Behavior\",\n\t\t\t\"_core\": true,\n\t\t\t\"context\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": null\n\t\t\t},\n\t\t\t\"core\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"useCoreAPI\": {\n\t\t\t\t\"type\": \"any\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"component\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"action\": {\n\t\t\t\t\"type\": \"javascript\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"_id\": \"166971fd9d107fd\"\n\t\t},\n\t\t\"135c71078810af2\": {\n\t\t\t\"_id\": \"135c71078810af2\",\n\t\t\t\"_name\": \"_Channel\",\n\t\t\t\"_core\": true,\n\t\t\t\"send\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"message\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemInstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemResolved\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemUninstalled\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStarted\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"$systemStopped\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"123751cb591de26\": {\n\t\t\t\"_id\": \"123751cb591de26\",\n\t\t\t\"_name\": \"_Component\",\n\t\t\t\"_core\": true,\n\t\t\t\"on\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"action\",\n\t\t\t\t\t\t\"type\": \"function\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"useCoreAPI\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"isCore\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"off\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"state\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"behaviorId\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"require\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"destroy\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"init\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"document\",\n\t\t\t\t\t\t\"type\": \"object\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"e\",\n\t\t\t\t\t\t\"type\": \"errorInfo\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"18a51169d7112d4\": {\n\t\t\t\"_name\": \"_Database\",\n\t\t\t\"_core\": true,\n\t\t\t\"collections\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"insert\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbInsertEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"update\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbUpdateEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"remove\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"event\",\n\t\t\t\t\t\t\"type\": \"dbRemoveEvent\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"_id\": \"18a51169d7112d4\"\n\t\t},\n\t\t\"16b9d1ac2216ffe\": {\n\t\t\t\"_id\": \"16b9d1ac2216ffe\",\n\t\t\t\"_name\": \"_Logger\",\n\t\t\t\"_core\": true,\n\t\t\t\"level\": {\n\t\t\t\t\"type\": \"log\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"warn\"\n\t\t\t},\n\t\t\t\"debug\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"info\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"warn\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"error\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"message\",\n\t\t\t\t\t\t\"type\": \"any\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t\"1d9b6139411aa91\": {\n\t\t\t\"_name\": \"_Message\",\n\t\t\t\"_core\": true,\n\t\t\t\"event\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"from\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"data\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": []\n\t\t\t},\n\t\t\t\"_id\": \"1d9b6139411aa91\"\n\t\t},\n\t\t\"1628c13c22152e6\": {\n\t\t\t\"_name\": \"_Metamodel\",\n\t\t\t\"_core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"schema\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"model\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"model\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"type\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"name\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"type\",\n\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\"default\": {},\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"create\": {\n\t\t\t\t\"params\": []\n\t\t\t},\n\t\t\t\"_id\": \"1628c13c22152e6\"\n\t\t},\n\t\t\"100b91ed2211b15\": {\n\t\t\t\"_id\": \"100b91ed2211b15\",\n\t\t\t\"_name\": \"_OSGi\",\n\t\t\t\"install\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"url\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"async\",\n\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\"mandatory\": false,\n\t\t\t\t\t\t\"default\": true\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"uninstall\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"id\",\n\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"status\": {\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"bundle\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t}\n\t\t},\n\t\t\"14c7c105b31a160\": {\n\t\t\t\"_id\": \"14c7c105b31a160\",\n\t\t\t\"_name\": \"_Runtime\",\n\t\t\t\"_core\": true,\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": true,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"6.0.0-beta.4\"\n\t\t\t},\n\t\t\t\"system\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"params\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": false\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"message\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"msg\",\n\t\t\t\t\t\t\"type\": \"message\",\n\t\t\t\t\t\t\"mandatory\": true\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t\"ready\": {}\n\t\t},\n\t\t\"170521b88614387\": {\n\t\t\t\"_name\": \"_System\",\n\t\t\t\"_core\": true,\n\t\t\t\"name\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": true,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"master\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"version\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"0.0.1\"\n\t\t\t},\n\t\t\t\"description\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t},\n\t\t\t\"schemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"models\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"behaviors\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"types\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"components\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"_id\": \"170521b88614387\"\n\t\t},\n\t\t\"1b2811b092143f5\": {\n\t\t\t\"_id\": \"1b2811b092143f5\",\n\t\t\t\"_name\": \"_SystemOSGi\",\n\t\t\t\"start\": {},\n\t\t\t\"stop\": {},\n\t\t\t\"_core\": true,\n\t\t\t\"state\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"none\"\n\t\t\t},\n\t\t\t\"location\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"readOnly\": false,\n\t\t\t\t\"mandatory\": false,\n\t\t\t\t\"default\": \"\"\n\t\t\t}\n\t\t},\n\t\t\"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n\t\t\t\"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n\t\t\t\"_name\": \"_History\",\n\t\t\t\"_description\": \"\",\n\t\t\t\"back\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"forward\": {\n\t\t\t\t\"result\": \"number\"\n\t\t\t},\n\t\t\t\"dump\": {\n\t\t\t\t\"result\": \"string\"\n\t\t\t},\n\t\t\t\"_core\": true,\n\t\t\t\"from\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"get\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"index\",\n\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": -1\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"object\"\n\t\t\t},\n\t\t\t\"load\": {\n\t\t\t\t\"params\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"dump\",\n\t\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\t\"default\": \"\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"result\": \"boolean\"\n\t\t\t},\n\t\t\t\"start\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"stop\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t},\n\t\t\t\"clear\": {\n\t\t\t\t\"result\": \"any\"\n\t\t\t}\n\t\t}\n\t},\n\t\"behaviors\": {\n\t\t\"12e491859c13918\": {\n\t\t\t\"_id\": \"12e491859c13918\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemStarted\",\n\t\t\t\"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1e9021bd4e1bc6e\": {\n\t\t\t\"_id\": \"1e9021bd4e1bc6e\",\n\t\t\t\"component\": \"_Channel\",\n\t\t\t\"state\": \"$systemInstalled\",\n\t\t\t\"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1ba721201114b6b\": {\n\t\t\t\"_id\": \"1ba721201114b6b\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"destroy\",\n\t\t\t\"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"15486186f41a48c\": {\n\t\t\t\"_id\": \"15486186f41a48c\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"off\",\n\t\t\t\"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1da0a17878104c3\": {\n\t\t\t\"_id\": \"1da0a17878104c3\",\n\t\t\t\"component\": \"_Component\",\n\t\t\t\"state\": \"require\",\n\t\t\t\"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1a5111d17a1800c\": {\n\t\t\t\"_id\": \"1a5111d17a1800c\",\n\t\t\t\"component\": \"_Database\",\n\t\t\t\"state\": \"collections\",\n\t\t\t\"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1d993108fa18ef2\": {\n\t\t\t\"_id\": \"1d993108fa18ef2\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"debug\",\n\t\t\t\"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a37a188e11fe73\": {\n\t\t\t\"_id\": \"1a37a188e11fe73\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"error\",\n\t\t\t\"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1edd21e12a16534\": {\n\t\t\t\"_id\": \"1edd21e12a16534\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"info\",\n\t\t\t\"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"141f2143d3122a4\": {\n\t\t\t\"_id\": \"141f2143d3122a4\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"level\",\n\t\t\t\"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"192401bab21304e\": {\n\t\t\t\"_id\": \"192401bab21304e\",\n\t\t\t\"component\": \"_Logger\",\n\t\t\t\"state\": \"warn\",\n\t\t\t\"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"11fc715e2f1a31e\": {\n\t\t\t\"_id\": \"11fc715e2f1a31e\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"create\",\n\t\t\t\"action\": \"function create() {\\n $metamodel.create();\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1232f1f107142cf\": {\n\t\t\t\"_id\": \"1232f1f107142cf\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"model\",\n\t\t\t\"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1365412f69153d2\": {\n\t\t\t\"_id\": \"1365412f69153d2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"schema\",\n\t\t\t\"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"194db147fe161a2\": {\n\t\t\t\"_id\": \"194db147fe161a2\",\n\t\t\t\"component\": \"_Metamodel\",\n\t\t\t\"state\": \"type\",\n\t\t\t\"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1ef951f1411b895\": {\n\t\t\t\"_id\": \"1ef951f1411b895\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"install\",\n\t\t\t\"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"14c1517b711cb78\": {\n\t\t\t\"_id\": \"14c1517b711cb78\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"uninstall\",\n\t\t\t\"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"105f219c6813643\": {\n\t\t\t\"_id\": \"105f219c6813643\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1a81a1f00d17269\": {\n\t\t\t\"_id\": \"1a81a1f00d17269\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n\t\t\t\"useCoreAPI\": false,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"116851b602128d1\": {\n\t\t\t\"_id\": \"116851b602128d1\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"status\",\n\t\t\t\"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"19cf317d7217331\": {\n\t\t\t\"_id\": \"19cf317d7217331\",\n\t\t\t\"component\": \"_OSGi\",\n\t\t\t\"state\": \"bundle\",\n\t\t\t\"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"13010167f313f87\": {\n\t\t\t\"_id\": \"13010167f313f87\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"system\",\n\t\t\t\"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n\t\t\t\"core\": true,\n\t\t\t\"useCoreAPI\": true\n\t\t},\n\t\t\"1cfa4145f614da8\": {\n\t\t\t\"_id\": \"1cfa4145f614da8\",\n\t\t\t\"component\": \"_Runtime\",\n\t\t\t\"state\": \"message\",\n\t\t\t\"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"1cb9d103d41dd97\": {\n\t\t\t\"_id\": \"1cb9d103d41dd97\",\n\t\t\t\"component\": \"e89c617b6b15d24\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n\t\t\t\"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"back\",\n\t\t\t\"action\": \"function back() { \\n return $history.back();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n\t\t\t\"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"forward\",\n\t\t\t\"action\": \"function forward() { \\n return $history.forward();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n\t\t\t\"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"dump\",\n\t\t\t\"action\": \"function dump() { \\n return $history.dump();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f06254ad-187e-400c-a582-b5ab81f24747\": {\n\t\t\t\"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"get\",\n\t\t\t\"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n\t\t\t\"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"from\",\n\t\t\t\"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n\t\t\t\"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"load\",\n\t\t\t\"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n\t\t\t\"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"start\",\n\t\t\t\"action\": \"function start() { \\n return $history.start();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n\t\t\t\"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"stop\",\n\t\t\t\"action\": \"function stop() { \\n return $history.stop();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t},\n\t\t\"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n\t\t\t\"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n\t\t\t\"component\": \"_History\",\n\t\t\t\"state\": \"clear\",\n\t\t\t\"action\": \"function clear() { \\n return $history.clear();\\n}\",\n\t\t\t\"useCoreAPI\": true,\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"types\": {\n\t\t\"css\": {\n\t\t\t\"_id\": \"h1d88311ac019211\",\n\t\t\t\"name\": \"css\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"date\": {\n\t\t\t\"_id\": \"c17cad1bc3d17752\",\n\t\t\t\"name\": \"date\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"json\": {\n\t\t\t\"_id\": \"e1d25a12e67127ed\",\n\t\t\t\"name\": \"json\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"dbInsertEvent\": {\n\t\t\t\"_id\": \"148ef1e19810e6d\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbInsertEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"document\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": {}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbRemoveEvent\": {\n\t\t\t\"_id\": \"1952e1ac4213f4a\",\n\t\t\t\"name\": \"dbRemoveEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"core\": true,\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"dbUpdateEvent\": {\n\t\t\t\"_id\": \"1f5c41309711752\",\n\t\t\t\"core\": true,\n\t\t\t\"name\": \"dbUpdateEvent\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"collection\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"id\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"field\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": \"\"\n\t\t\t\t},\n\t\t\t\t\"value\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true,\n\t\t\t\t\t\"default\": null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"collection\": {\n\t\t\t\"_id\": \"d1c0d0130c616199\",\n\t\t\t\"name\": \"collection\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"string\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"event\": {\n\t\t\t\"_id\": \"g1668d1de2d1ff6f\",\n\t\t\t\"name\": \"event\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"html\": {\n\t\t\t\"_id\": \"y161c21320b11acb\",\n\t\t\t\"name\": \"html\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"javascript\": {\n\t\t\t\"_id\": \"s13d4c1fdf916504\",\n\t\t\t\"name\": \"javascript\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"link\": {\n\t\t\t\"_id\": \"p124601801d1dbfa\",\n\t\t\t\"name\": \"link\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"kind\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"log\": {\n\t\t\t\"_id\": \"d1fd161a4a4149fc\",\n\t\t\t\"name\": \"log\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"debug\",\n\t\t\t\t\"info\",\n\t\t\t\t\"warn\",\n\t\t\t\t\"error\",\n\t\t\t\t\"off\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"message\": {\n\t\t\t\"_id\": \"l13b061ac571272d\",\n\t\t\t\"name\": \"message\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"event\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"from\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"method\": {\n\t\t\t\"_id\": \"x1227218eed1f3e9\",\n\t\t\t\"name\": \"method\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"result\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"params\": {\n\t\t\t\t\t\"type\": [\n\t\t\t\t\t\t\"parameter\"\n\t\t\t\t\t],\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"osgiStates\": {\n\t\t\t\"_id\": \"q1f0ca120fc13fb3\",\n\t\t\t\"name\": \"osgiStates\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"value\": [\n\t\t\t\t\"none\",\n\t\t\t\t\"installed\",\n\t\t\t\t\"resolved\",\n\t\t\t\t\"starting\",\n\t\t\t\t\"active\",\n\t\t\t\t\"stopping\",\n\t\t\t\t\"uninstalled\"\n\t\t\t],\n\t\t\t\"core\": true\n\t\t},\n\t\t\"parameter\": {\n\t\t\t\"_id\": \"e1b18e16c6c195ad\",\n\t\t\t\"name\": \"parameter\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"any\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"property\": {\n\t\t\t\"_id\": \"a16a3a1ae051a55d\",\n\t\t\t\"name\": \"property\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"type\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"readOnly\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"mandatory\": {\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"default\": {\n\t\t\t\t\t\"type\": \"{type}\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"description\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t},\n\t\t\t\t\"label\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": false\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t},\n\t\t\"text\": {\n\t\t\t\"_id\": \"c136fc129a912f54\",\n\t\t\t\"name\": \"text\",\n\t\t\t\"type\": \"string\",\n\t\t\t\"core\": true\n\t\t},\n\t\t\"errorInfo\": {\n\t\t\t\"_id\": \"e198761fc0b1ae8a\",\n\t\t\t\"name\": \"errorInfo\",\n\t\t\t\"type\": \"object\",\n\t\t\t\"schema\": {\n\t\t\t\t\"message\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t},\n\t\t\t\t\"stack\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"mandatory\": true\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"core\": true\n\t\t}\n\t},\n\t\"components\": {\n\t\t\"_Channel\": {\n\t\t\t\"channel\": {\n\t\t\t\t\"_id\": \"channel\"\n\t\t\t}\n\t\t},\n\t\t\"_Database\": {\n\t\t\t\"db\": {\n\t\t\t\t\"_id\": \"db\"\n\t\t\t}\n\t\t},\n\t\t\"_Logger\": {\n\t\t\t\"logger\": {\n\t\t\t\t\"_id\": \"logger\",\n\t\t\t\t\"level\": \"warn\"\n\t\t\t}\n\t\t},\n\t\t\"_Metamodel\": {\n\t\t\t\"metamodel\": {\n\t\t\t\t\"_id\": \"metamodel\"\n\t\t\t}\n\t\t},\n\t\t\"_Runtime\": {\n\t\t\t\"runtime\": {\n\t\t\t\t\"_id\": \"runtime\",\n\t\t\t\t\"version\": \"6.0.0-beta.4\"\n\t\t\t}\n\t\t},\n\t\t\"_History\": {\n\t\t\t\"history\": {\n\t\t\t\t\"_id\": \"history\"\n\t\t\t}\n\t\t}\n\t},\n\t\"_id\": \"e89c617b6b15d24\"\n}\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,CAAC,WAAY,aAAc,OAAQ,SAAU,SAiHlEC,cA/GoB,CACpB,UACA,SACA,S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CACXuZ,QAAW,CACVpiB,IAAO,UACP2e,QAAW,iBAGb0D,SAAY,CACXC,QAAW,CACVtiB,IAAO,aAIVA,IAAO,oBDh0CRiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file +{"version":3,"file":"system-runtime.js","sources":["../src/mson.js","../src/log.js","../src/helper.js","../src/metamodel.js","../src/behavior.js","../src/state.js","../src/history.js","../src/workflow.js","../src/component.js","../src/db.js","../src/runtime.js","../src/system.js"],"sourcesContent":["/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module mson\n * @description This module contains all the mson definition.\n */\n\nconst ID = '_id'\nconst NAME = '_name'\nconst DESCRIPTION = '_description'\nconst INHERIT = '_inherit'\nconst CLASS = '_class'\nconst CORE = '_core'\n\nconst INTERNAL_NAMES = [\n '_id',\n '_name',\n '_inherit',\n '_description',\n '_class',\n '_core',\n]\n\nconst PROPERTY_TYPE = 'property'\nconst COLLECTION_TYPE = 'collection'\nconst LINK_TYPE = 'link'\nconst METHOD_TYPE = 'method'\nconst EVENT_TYPE = 'event'\n\nconst INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']\n\nconst DEFAULT_TYPES = [\n 'boolean',\n 'string',\n 'number',\n 'object',\n 'function',\n 'array',\n 'date',\n 'any',\n]\n\nconst SCHEMA_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n default: ['_Component'],\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst MODEL_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst TYPE_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n name: {\n type: 'string',\n mandatory: true,\n },\n type: {\n type: 'string',\n mandatory: true,\n },\n schema: {\n type: 'object',\n mandatory: false,\n },\n value: {\n type: ['any'],\n mandatory: false,\n },\n core: {\n type: 'boolean',\n mandatory: false,\n },\n description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nexport default {\n ID,\n NAME,\n DESCRIPTION,\n INHERIT,\n CLASS,\n CORE,\n INTERNAL_NAMES,\n PROPERTY_TYPE,\n COLLECTION_TYPE,\n LINK_TYPE,\n METHOD_TYPE,\n EVENT_TYPE,\n INTERNAL_TYPES,\n DEFAULT_TYPES,\n SCHEMA_DEFINITION,\n MODEL_DEFINITION,\n TYPE_DEFINITION,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module log\n * @requires metamodel\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions that write a log\n */\n\nimport $metamodel from './metamodel.js'\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet currentLevel = 'warn' // eslint-disable-line no-unused-vars\nlet loggerRef = null\nlet fakeLoggerRef = {\n currentLevel: 'warn',\n level: function debug(levelName) {\n if (levelName) {\n this.currentLevel = levelName\n }\n return this.currentLevel\n },\n debug: function debug(message) {\n if (this.currentLevel === 'debug') {\n console.log('runtime: ' + message)\n }\n },\n info: function info(message) {\n if (this.currentLevel === 'info' || this.currentLevel === 'debug') {\n console.info('runtime: ' + message)\n }\n },\n warn: function warning(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug'\n ) {\n console.warn('runtime: ' + message)\n }\n },\n error: function error(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug' ||\n this.currentLevel === 'error'\n ) {\n console.error('runtime: ' + message)\n }\n },\n}\n\n/**\n * @method getLogger\n * @return {_Logger} _Logger instance\n * @private\n * @description Get the _Logger instance\n */\nfunction getLogger() {\n let loggerId = ''\n let loggers = []\n let result = null\n\n if (!$metamodel.getModel('_Logger')) {\n result = fakeLoggerRef\n } else {\n loggers = $db.collections._Logger.find()\n if (loggers.length) {\n loggerId = loggers[0][$mson.ID]\n\n if ($component.get(loggerId)) {\n loggerRef = $component.get(loggerId)\n result = loggerRef\n } else {\n result = fakeLoggerRef\n }\n } else {\n result = fakeLoggerRef\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method level\n * @param {String} levelName name of the level\n * @description Set the level of the log\n */\nfunction level(levelName) {\n currentLevel = levelName\n}\n\n/**\n * @method unknownProperty\n * @param {String} propertyName the name of the property\n * @param {Object} schema the schema definition\n * @description A property of a schema is unknown\n */\nfunction unknownProperty(propertyName, schema) {\n let message = ''\n\n if (schema[$mson.NAME]) {\n message =\n \"unknown property '\" +\n propertyName +\n \"' for the definition of '\" +\n schema[$mson.NAME] +\n \"'\"\n } else {\n message = \"unknown property '\" + propertyName + \"' for a model\"\n }\n\n getLogger().warn(message)\n}\n\n/**\n * @method invalidPropertyType\n * @param {String} propertyName name of the peropety\n * @param {String} type the type defined by the schema\n * @param {String} property the property\n * @description Invalid type for a property\n */\nfunction invalidPropertyType(propertyName, type, property) {\n let realType =\n property && property.constructor\n ? property.constructor.name\n : typeof property\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidEnumValue\n * @param {Object} value the value\n * @param {String} type the type defined by the schema\n * @description Invalid value for type enum\n */\nfunction invalidEnumValue(value, type) {\n getLogger().warn(\n \"'\" + value + \"' is an invalid value for the type enum '\" + type + \"'\"\n )\n}\n\n/**\n * @method invalidClassName\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidClassName(componentId, type, constructorName) {\n getLogger().warn(\n \"invalid component '\" +\n componentId +\n \"' for a collection: expected a component of class '\" +\n type +\n \"' instead of '\" +\n constructorName +\n \"'\"\n )\n}\n\n/**\n * @method missingProperty\n * @param {String} propertyName name of the property\n * @description Missing a property\n */\nfunction missingProperty(propertyName) {\n getLogger().warn(\"property '\" + propertyName + \"' is missing\")\n}\n\n/**\n * @method missingImplementation\n * @param {String} name name of the missing schema\n * @description A class definition is missing\n */\nfunction missingImplementation(name) {\n getLogger().warn(\"schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method invalidTypeImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Invalid type for a property of a class definition\n */\nfunction invalidTypeImp(property, className) {\n getLogger().error(\n \"the property '\" + property + \"' of \" + className + ' model is invalid'\n )\n}\n\n/**\n * @method missingPropertyImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Missing a property for a class definition\n */\nfunction missingPropertyImp(property, className) {\n getLogger().warn(\n \"missing property '\" + property + \"' in the model '\" + className + \"'\"\n )\n}\n\n/**\n * @method unknownPropertyImp\n * @param {String} property a property\n * @param {Object} schema a schema\n * @description Unkown property for a class definition\n */\nfunction unknownPropertyImp(property, schema) {\n getLogger().error(\n \"the model '\" + schema + \"' has an unknown property '\" + property + \"'\"\n )\n}\n\n/**\n * @method invalidTypeDefinition\n * @param {String} name a type definition\n * @description Try to add an invalid type\n */\nfunction invalidTypeDefinition(name) {\n getLogger().warn(\"the type '\" + name + \"' is not valid\")\n}\n\n/**\n * @method invalidPropertyName\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type type defined by the schema\n * @description Invalid property name\n */\nfunction invalidPropertyName(id, className, propertyName, propertyValue, type) {\n let classInfo = ''\n let realType = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n if (typeof type === 'string') {\n realType =\n propertyValue && propertyValue.constructor\n ? propertyValue.constructor.name\n : typeof propertyValue\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n realType = type && type.constructor ? type.constructor.name : typeof type\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n classInfo +\n \": expected type 'string' instead of type '\" +\n realType +\n \"'\"\n )\n }\n}\n\n/**\n * @method readOnlyProperty\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @description Trying to set a read-only property\n */\nfunction readOnlyProperty(id, className, propertyName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"can not set read-only property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidDocumentOnDbInsert\n * @param {String} doc a document\n * @param {String} collectionName the name of the collection\n * @description Invalid document on a System Runtime database insert operation\n */\nfunction invalidDocumentOnDbInsert(doc, collectionName) {\n getLogger().warn(\n \"invalid document '\" +\n JSON.stringify(doc).replace(/,/g, ', ') +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidPropertyTypeOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} id id of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type expected type defined by the schema\n * @description Invalid property on a System Runtime database update operation\n */\nfunction invalidPropertyTypeOnDbUpdate(\n collectionName,\n id,\n propertyName,\n propertyValue,\n type\n) {\n getLogger().warn(\n \"invalid type for the property '\" +\n propertyName +\n \"' of the document '\" +\n id +\n \"' (\" +\n collectionName +\n \" collection) with the value '\" +\n JSON.stringify(propertyValue) +\n \"': expected type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownPropertyOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Unkonw property on a System Runtime database update operation\n */\nfunction unknownPropertyOnDbUpdate(propertyName, collectionName, id) {\n getLogger().warn(\n \"unknown property '\" +\n propertyName +\n \"' for document '\" +\n id +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method unknownMethod\n * @param {String} classId id of the class\n * @param {String} methodName name of the method\n * @description Call an unknown method of a class\n */\nfunction unknownMethod(classId, methodName) {\n getLogger().warn(\n \"try to call an unknown action '\" +\n methodName +\n \"' for the class '\" +\n classId +\n \"'\"\n )\n}\n\n/**\n * @method invalidCollectionName\n * @param {String} name name of the collection\n * @description Try to create an invalid DatabaseCollection\n */\nfunction invalidCollectionName(name) {\n getLogger().warn(\n \"invalid name for the collection '\" +\n name +\n \"': there is no schema '\" +\n name +\n \"'\"\n )\n}\n\n/**\n * @method invalidResultType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name ot the method\n * @param {String} expectedType expected type\n * @param {String} type current type\n * @description Invalid type result of a method\n */\nfunction invalidResultType(id, className, methodName, expectedType, type) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid type for the result of action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n expectedType +\n \"' instead of type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownComponent\n * @param {String} id id of the class\n * @param {String} componentId id of the component\n * @description Unknown class\n */\nfunction unknownComponent(className, componentId) {\n getLogger().warn(\n \"unkown class name '\" + className + \"' for component '\" + componentId + \"'\"\n )\n}\n\n/**\n * @method invalidParamNumber\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a method\n */\nfunction invalidParamNumber(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid number of parameters when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidParamType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @param {String} paramName name of the parameter\n * @description Invalid type parameters for a method\n */\nfunction invalidParamType(id, className, methodName, paramName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n if (paramName !== undefined) {\n getLogger().warn(\n \"invalid type for the parameter '\" +\n paramName +\n \"' when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n } else {\n getLogger().warn(\n \"invalid type for a parameter when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n }\n}\n\n/**\n * @method behaviorNotUnique\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Add a more than one behavior to a state\n */\nfunction behaviorNotUnique(id, stateName) {\n getLogger().warn(\n \"try to add more than one action for the state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOn\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Can not add a behavior with an invalid state\n */\nfunction invalidStateOn(id, stateName) {\n getLogger().warn(\n \"try to add an action to an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOff\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description The call to a remove state of the behavior module is invalid\n */\nfunction invalidStateOff(id, stateName) {\n getLogger().warn(\n \"try to remove an action from an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method masterSystemNotFound\n * @description The master system is not found\n */\nfunction masterSystemNotFound() {\n getLogger().warn('can not export the database because no system was defined')\n}\n\n/**\n * @method invalidType\n * @param {String} name name of the type\n * @param {String} value value of the type\n * @param {String} typeName expected type defined by the schema\n * @description Invalid type\n */\nfunction invalidType(name, value, typeName) {\n let realType =\n name && value.constructor ? value.constructor.name : typeof value\n\n getLogger().warn(\n \"invalid value for property '\" +\n name +\n \"': expected type '\" +\n typeName +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidConfiguration\n * @param {Object} obj an object\n * @param {String} type expected type for the configuration\n * @description Invalid class name\n */\nfunction invalidConfiguration(obj, type) {\n getLogger().warn(\n \"invalid type for '\" + JSON.stringify(obj) + \"': expected '\" + type + \"'\"\n )\n}\n\n/**\n * @method unknownType\n * @param {String} value value\n * @description Unknown type\n */\nfunction unknownType(value) {\n getLogger().warn(\"unknown type for value '\" + JSON.stringify(value) + \"'\")\n}\n\n/**\n * @method unknownPath\n * @param {String} path path\n * @param {String} path subpath\n * @description Unknown subpath in a path\n */\nfunction unknownPath(path, subpath) {\n getLogger().warn(\n \"the path '\" + path + \"' has an unkown subpath '\" + subpath + \"'\"\n )\n}\n\n/**\n * @method canNotYetValidate\n * @param {String} id id of the component\n * @param {String} className name of the class\n * @description A component has not been alreay validated\n */\nfunction canNotYetValidate(id, className) {\n getLogger().debug(\n \"can not yet validate if the document '\" +\n id +\n \"' is compliant with \" +\n className +\n ' model'\n )\n}\n\n/**\n * @method invalidChannelEvent\n * @param {String} message message send\n * @param {String} eventName name of the event\n * @param {String} type expected type\n * @description A message send by the channel is invalid\n */\nfunction invalidChannelEvent(message, eventName, type) {\n getLogger().warn(\n \"invalid type for the message '\" +\n JSON.stringify(message) +\n \"': expected type '\" +\n type +\n \"' for event '\" +\n eventName +\n \"'\"\n )\n}\n\n/**\n * @method invalidParamNumberMethodOn\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a behavior add with 'on' method\n */\nfunction invalidParamNumberMethodOn(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"invalid number of parameters when adding an action for the state '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method updateUuid\n * @param {String} currentId id of the component\n * @param {String} newId of the component\n * @param {Boolean} alreadyUsed newId already used\n * @description Change the id of a component\n */\nfunction updateUuid(currentId, newId, alreadyUsed) {\n if (alreadyUsed) {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"' that is already used\"\n )\n } else {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"'\"\n )\n }\n}\n\n/**\n * @method invalidUseOfComponent\n * @param {String} id id of the component\n * @description Try to change the state of a component that has been destroyed\n */\nfunction invalidUseOfComponent(id) {\n getLogger().warn(\n \"try to change the state of the destroyed component '\" + id + \"'\"\n )\n}\n\n/**\n * @method invalidSchema\n * @param {String} name name of the schema\n * @description Try to add an invalid schema\n */\nfunction invalidSchema(name) {\n getLogger().warn(\n \"the schema '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidModel\n * @param {String} name name of the model\n * @description Try to add an invalid model\n */\nfunction invalidModel(name) {\n getLogger().warn(\n \"the model '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidParameters\n * @param {String} classId class name of the component\n * @param {String} document document\n * @description Invalid parameters set when creating an instance of a class\n */\nfunction invalidParameters(classId, document) {\n let id = document && document._id ? document._id : ''\n\n getLogger().warn(\n \"the parameters for creating '\" +\n id +\n \"' component (\" +\n classId +\n ' model) are not compliant with the model'\n )\n}\n\n/**\n * @method destroyedComponentCall\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Try to get the property of a destroyed component\n */\nfunction destroyedComponentCall(propertyName, id) {\n getLogger().warn(\n \"trying to get the property '\" +\n propertyName +\n \"' on the destroyed component '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidConctructorParameters\n * @param {String} object configuration\n * @param {String} name schema name\n * @description Invalid parameter type when creating an instance of a class\n */\nfunction invalidConctructorParameters(object, name) {\n getLogger().warn(\n \"the constructor parameter '\" +\n JSON.stringify(object).replace(/,/g, ', ') +\n \"' for creating a component of class '\" +\n name +\n \"' is not an object\"\n )\n}\n\n/**\n * @method unknownModel\n * @param {String} classId id of the class\n * @description Get the information of an unkown model\n */\nfunction unknownModel(classId) {\n getLogger().warn(\"the model '\" + classId + \"' does not exist\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema\n * @description A schema is missing\n */\nfunction missingSchema(name) {\n getLogger().warn(\"the schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema where the cyclic dependency was found\n * @description A cyclic dependency was found\n */\nfunction cyclicDependency(name) {\n if (name) {\n getLogger().error(\n \"a cyclic inheritance dependency with the schema '\" +\n name +\n \"’ has been found, please check the '_inherit' property of this schema\"\n )\n } else {\n getLogger().error(\n \"a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas\"\n )\n }\n}\n\n/**\n * @method invalidEnumType\n * @param {Object} value the value\n * @param {String} typeName name of the type\n * @param {String} type typeName of the type\n * @description Invalid type for a type enum\n */\nfunction invalidEnumType(value, typeName, type) {\n let realType = ''\n\n if (typeof type !== 'undefined' && type !== typeof value) {\n realType =\n value && value.constructor ? value.constructor.name : typeof value\n getLogger().warn(\n \"invalid type for the type '\" +\n typeName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n getLogger().warn(\"invalid type for the type '\" + typeName + \"'\")\n }\n}\n\n/**\n * @method loadSchema\n * @param {String} name name of the schema\n * @description Load schema\n */\nfunction loadSchema(name) {\n getLogger().debug(\"load schema '\" + name + \"'\")\n}\n\n/**\n * @method loadModel\n * @param {String} name name of the model\n * @description Load model\n */\nfunction loadModel(name) {\n getLogger().debug(\"load model '\" + name + \"'\")\n}\n\n/**\n * @method loadType\n * @param {String} name name of the type\n * @description Load type\n */\nfunction loadType(name) {\n getLogger().debug(\"load type '\" + name + \"'\")\n}\n\n/**\n * @method generatingSchema\n * @param {String} name name of the schema\n * @description Generate schema\n */\nfunction generatingSchema(name) {\n getLogger().debug('generating ' + name + ' schema ...')\n}\n\n/**\n * @method checkModel\n * @param {String} name name of the model\n * @description Check model\n */\nfunction checkModel(name) {\n getLogger().debug('analyzing ' + name + ' model...')\n}\n\n/**\n * @method createClass\n * @param {String} name name of the class\n * @description Create class\n */\nfunction createClass(name) {\n getLogger().debug(name + ' class has been created')\n}\n\n/**\n * @method initDb\n * @description Init the database\n */\nfunction initDb() {\n getLogger().debug('initializing data store...')\n}\n\n/**\n * @method actionInvokeError\n * @param {String} state state\n * @param {String} id component id\n * @param {String} className component class name\n * @param {String} message\n * @description An error happened when invoking a behavior\n */\nfunction actionInvokeError(state, id, className, message) {\n if (className !== 'Function') {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"' (\" +\n className +\n ' class): ' +\n message\n )\n } else {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"': \" +\n message\n )\n }\n}\n\n/**\n * @method invalidSchemaPropertyName\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaPropertyName(name, propName) {\n getLogger().warn(\n \"invalid name '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': a property name can not begin with '_'\"\n )\n}\n\n/**\n * @method invalidSchemaProperty\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaProperty(name, propName) {\n getLogger().warn(\n \"invalid property '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': only 'property', 'link', 'collection', 'method' and 'event' are allowed\"\n )\n}\n\n/**\n * @method invalidPropertyFormat\n * @param {String} obj definition of a property\n * @description Invalid format for the definition of a property\n */\nfunction invalidPropertyFormat(obj) {\n getLogger().warn(\n \"invalid format for a definition of a property: '\" +\n obj +\n \"' is not an object\"\n )\n}\n\n/**\n * @method invalidState\n * @param {String} model name of the model\n * @param {String} state invalid state\n * @description Invalid state\n */\nfunction invalidState(model, state) {\n getLogger().warn(\n \"invalid state '\" + state + \"' for the model '\" + model + \"'\"\n )\n}\n\n/**\n * @method unknownContext\n * @param {String} className name of the class\n * @param {String} methodName name of the method\n * @description Invoke a method class without a context\n */\nfunction unknownContext(className, methodName) {\n getLogger().warn(\n \"invoke the action '\" +\n methodName +\n \"' on the class '\" +\n className +\n \"' without a valid context\"\n )\n}\n\n/**\n * @method historyDocumentInserted\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} document\n * @description Created document from history\n */\nfunction historyDocumentInserted(id, collectionName, doc) {\n getLogger().debug(\n \"Created component of id '\" +\n id +\n \"' ('\" +\n collectionName +\n \" collection) with document '\" +\n doc +\n \"'\"\n )\n}\n\n/**\n * @method historyDocumentRemoved\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @description Removed document from history\n */\nfunction historyDocumentRemoved(id, collectionName) {\n getLogger().debug(\n \"Destroyed component of id '\" + id + \"' (\" + collectionName + ' collection)'\n )\n}\n\n/**\n * @method historyDocumentUpdated\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} fieldName field name of the component\n * @param {String} value value of the field\n * @description Updated document from history\n */\nfunction historyDocumentUpdated(id, collectionName, fieldName, value) {\n getLogger().debug(\n \"Updated field '\" +\n fieldName +\n \"' of component of id '\" +\n id +\n \"' with value '\" +\n value +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidCollectionItem\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidCollectionItem(\n id,\n className,\n propertyName,\n propertyValue,\n type\n) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' for all items of the collection '\" +\n JSON.stringify(propertyValue) +\n \"'\"\n )\n}\n\nexport default {\n level,\n unknownProperty,\n invalidPropertyType,\n invalidEnumValue,\n invalidClassName,\n missingProperty,\n missingImplementation,\n invalidTypeImp,\n missingPropertyImp,\n unknownPropertyImp,\n invalidTypeDefinition,\n invalidPropertyName,\n readOnlyProperty,\n invalidDocumentOnDbInsert,\n invalidPropertyTypeOnDbUpdate,\n unknownPropertyOnDbUpdate,\n unknownMethod,\n invalidCollectionName,\n invalidResultType,\n unknownComponent,\n invalidParamNumber,\n invalidParamType,\n behaviorNotUnique,\n invalidStateOn,\n invalidStateOff,\n masterSystemNotFound,\n invalidType,\n invalidConfiguration,\n unknownType,\n unknownPath,\n canNotYetValidate,\n invalidChannelEvent,\n invalidParamNumberMethodOn,\n updateUuid,\n invalidUseOfComponent,\n invalidSchema,\n invalidModel,\n invalidParameters,\n destroyedComponentCall,\n invalidConctructorParameters,\n unknownModel,\n missingSchema,\n cyclicDependency,\n invalidEnumType,\n loadSchema,\n loadModel,\n loadType,\n generatingSchema,\n checkModel,\n createClass,\n initDb,\n actionInvokeError,\n invalidSchemaPropertyName,\n invalidSchemaProperty,\n invalidPropertyFormat,\n invalidState,\n unknownContext,\n historyDocumentInserted,\n historyDocumentRemoved,\n historyDocumentUpdated,\n invalidCollectionItem,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module helper\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions used by all the modules\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private property */\n\nlet runtimeRef = null\n\n/* Public method */\n\n/**\n * @method isRuntime\n * @returns {Boolean} true if a System Runtime instance exist\n * @description Check if a System Runtime instance exists\n */\nfunction isRuntime() {\n let result = false\n\n if ($db.collections._Runtime && $db.collections._Runtime.find().length) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method getRuntime\n * @returns {_Runtime} System Runtime instance\n * @description Get the System Runtime instance\n */\nfunction getRuntime() {\n let runtimeId = ''\n let search = $db.collections._Runtime.find()\n\n if (!runtimeRef && search[0]) {\n runtimeId = search[0][$mson.ID]\n runtimeRef = $component.get(runtimeId)\n }\n\n return runtimeRef\n}\n\n/**\n * @method isOnNode\n * @returns {Boolean} true if a System Runtime is running on node\n * @description Check if a System Runtime is running on node\n */\nfunction isOnNode() {\n let result = false\n\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n result = true\n }\n\n return result\n}\n\n/**\n * @method generateId\n * @returns {String} a uuid\n * @description Generate a uuid\n */\nfunction generateId() {\n // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n function gen() {\n return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (Math.random() * 16) | 0\n let v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n }\n\n // force the uuid to start with a letter\n function getPrefix() {\n let validPrefix = 'abcdef'\n return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length))\n }\n\n return getPrefix() + gen()\n}\n\nexport default {\n isRuntime,\n getRuntime,\n isOnNode,\n generateId,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module metamodel\n * @requires db\n * @requires log\n * @requires component\n * @requires workflow\n * @requires helper\n * @requires mson\n * @description This module manages System Runtime metamodel.\n * System Runtime metamodel loads schemas and types, analyzes them and\n * creates the component classes and related DatabaseCollections.\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\nimport $component from './component.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n}\n\n/* Private methods */\n\n/**\n * @method isInternalName\n * @param {String} name\n * @private\n * @description is name an internal name\n */\nfunction isInternalName(name) {\n let result = true\n\n if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {\n result = false\n }\n return result\n}\n\n/**\n * @method generateModels\n * @private\n * @description Generate the models\n */\nfunction generateModels() {\n let att = ''\n let name = ''\n let schemaName = ''\n let schema = {}\n let schemaDef = null\n let modelName = ''\n let modelParent = null\n let modelExt = null\n let modelDef = null\n let model = {}\n let mergedModel = {}\n let parents = []\n let length = 0\n let i = 0\n let j = 0\n let nbAncestors = 0\n let sortInheritTree = []\n\n // default values\n for (schemaName in store.generatedSchemas) {\n schema = store.generatedSchemas[schemaName]\n\n // set model internal properties\n model = {\n _name: schema[$mson.NAME],\n }\n\n // set _core\n if (typeof schema[$mson.CORE] !== 'undefined') {\n model[$mson.CORE] = schema[$mson.CORE]\n }\n\n // set inherit\n if (Array.isArray(schema[$mson.INHERIT])) {\n model[$mson.INHERIT] = schema[$mson.INHERIT]\n }\n\n // set class\n if (typeof schema[$mson.CLASS] !== 'undefined') {\n model[$mson.CLASS] = schema[$mson.CLASS]\n }\n\n // set description\n if (typeof schema[$mson.DESCRIPTION] !== 'undefined') {\n model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]\n }\n\n // check valid name\n for (att in schema) {\n if (!isInternalName(att) && att.indexOf('_') === 0) {\n $log.invalidSchemaPropertyName(schema[$mson.NAME], att)\n }\n }\n\n // set model default values\n for (att in schema) {\n switch (true) {\n case schema[att] === 'property':\n model[att] = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'link':\n model[att] = {\n type: '_Component',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'method':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n result: 'any',\n description: att,\n }\n break\n case schema[att] === 'event':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n description: att,\n }\n break\n case schema[att] === 'collection':\n model[att] = {\n type: ['_Component'],\n readOnly: false,\n mandatory: false,\n default: [],\n description: att,\n label: att,\n }\n break\n default:\n if (!isInternalName(att)) {\n $log.invalidSchemaProperty(schema[$mson.NAME], att)\n }\n break\n }\n }\n\n store.generatedModels[model[$mson.NAME]] = model\n }\n\n // models to override\n for (modelName in store.generatedModels) {\n model = store.generatedModels[modelName]\n name = model[$mson.NAME]\n modelExt = store.models[name]\n if (modelExt) {\n mergedModel = merge(modelExt, model)\n store.generatedModels[name] = mergedModel\n }\n }\n\n // inheritance\n sortInheritTree = sortInheritanceTree()\n\n nbAncestors = sortInheritTree.length\n for (i = 0; i < nbAncestors; i++) {\n modelName = sortInheritTree[i]\n model = store.generatedModels[modelName]\n\n if (model) {\n parents = getParents(modelName)\n parents.reverse()\n\n length = parents.length\n for (j = 0; j < length; j++) {\n name = parents[j]\n modelParent = store.generatedModels[name]\n if (modelParent) {\n mergedModel = merge(modelParent, model)\n store.generatedModels[modelName] = mergedModel\n }\n }\n\n // last inherit\n // is the overriden model\n modelExt = store.models[modelName]\n if (modelExt) {\n mergedModel = merge(modelExt, store.generatedModels[modelName])\n store.generatedModels[modelName] = mergedModel\n }\n }\n }\n\n // save\n for (schemaName in store.generatedSchemas) {\n schemaDef = store.generatedSchemas[schemaName]\n $db.collections._GeneratedSchema.insert(schemaDef)\n }\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n $db.collections._GeneratedModel.insert(modelDef)\n }\n}\n\n/**\n * @method loadInMemory\n * @private\n * @description Load schemas and types in memory\n */\nfunction loadInMemory() {\n let schemas = []\n let types = []\n let schema = null\n let model = {}\n let models = []\n let type = null\n let name = ''\n let inherit = ''\n let i = 0\n let length = 0\n\n // init store\n store.inheritance = {}\n store.inheritanceTree = {}\n store.schemas = {}\n store.generatedSchemas = {}\n store.models = {}\n store.generatedModels = {}\n store.states = {}\n store.type = {}\n\n // load schemas\n schemas = $db.collections._Schema.find({})\n\n length = schemas.length\n for (i = 0; i < length; i++) {\n schema = schemas[i]\n\n name = schema[$mson.NAME]\n inherit = schema[$mson.INHERIT]\n\n store.schemas[name] = schema\n if (inherit) {\n store.inheritance[name] = inherit\n }\n\n if (!schema[$mson.CORE]) {\n $log.loadSchema(name)\n }\n }\n\n // load models\n models = $db.collections._Model.find({})\n\n length = models.length\n for (i = 0; i < length; i++) {\n model = models[i]\n name = model[$mson.NAME]\n\n store.models[name] = model\n\n if (!model[$mson.CORE]) {\n $log.loadModel(name)\n }\n }\n\n // load types\n types = $db.collections._Type.find({})\n\n length = types.length\n for (i = 0; i < length; i++) {\n type = types[i]\n store.type[type.name] = type\n\n if (!type.core) {\n $log.loadType(type.name)\n }\n }\n}\n\n/**\n * @method createInheritanceTree\n * @private\n * @description Create the inheritance tree\n */\nfunction createInheritanceTree() {\n let name = ''\n let c3linerization = []\n let ancestors = []\n\n /**\n *\n * @param {Array} elts array of elts\n * @returns {Boolean} true if all the arrays are empty\n * @private\n * @description Check if we have finisehd to linerize\n */\n function _isEmpty(elts) {\n let i = 0\n let length = 0\n let result = true\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].length) {\n result = false\n }\n }\n return result\n }\n\n /**\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @private\n * @description Remove an elt from all the arrays\n */\n function _removeCandidate(elt, elts) {\n let i = 0\n let length = 0\n let arr = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) === 0) {\n arr = elts[i]\n arr.reverse()\n arr.pop()\n arr.reverse()\n elts[i] = arr\n }\n }\n }\n\n /**\n * @method _isCandidate\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @returns {Boolean} true if the element is a good candidate.\n * @private\n * @description Check the element is a good candidate\n */\n function _isCandidate(elt, elts) {\n let result = true\n let i = 0\n let length = 0\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) > 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n \"name\": \"system-runtime\",\n \"master\": false,\n \"version\": \"6.0.0-beta.4\",\n \"description\": \"System Runtime\",\n \"schemas\": {\n \"1ac07185641fa9f\": {\n \"_name\": \"_Behavior\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"core\": \"property\",\n \"component\": \"property\",\n \"action\": \"property\",\n \"state\": \"property\",\n \"useCoreAPI\": \"property\",\n \"context\": \"property\",\n \"_id\": \"1ac07185641fa9f\"\n },\n \"104ad1f48518376\": {\n \"_id\": \"104ad1f48518376\",\n \"_name\": \"_Channel\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"send\": \"event\",\n \"$systemInstalled\": \"event\",\n \"$systemResolved\": \"event\",\n \"$systemStarted\": \"event\",\n \"$systemStopped\": \"event\",\n \"$systemUninstalled\": \"event\"\n },\n \"111df11e2b19fde\": {\n \"_id\": \"111df11e2b19fde\",\n \"_name\": \"_Component\",\n \"_inherit\": [],\n \"_core\": true,\n \"on\": \"method\",\n \"off\": \"method\",\n \"require\": \"method\",\n \"destroy\": \"method\",\n \"init\": \"method\",\n \"error\": \"event\"\n },\n \"1723516a30132ac\": {\n \"_name\": \"_Database\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"collections\": \"method\",\n \"insert\": \"event\",\n \"update\": \"event\",\n \"remove\": \"event\",\n \"_id\": \"1723516a30132ac\"\n },\n \"1268f1dddd1fea7\": {\n \"_name\": \"_Logger\",\n \"_core\": true,\n \"level\": \"property\",\n \"debug\": \"method\",\n \"info\": \"method\",\n \"warn\": \"method\",\n \"error\": \"method\",\n \"_id\": \"1268f1dddd1fea7\"\n },\n \"14caa1c46414ee1\": {\n \"_name\": \"_Message\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"event\": \"property\",\n \"from\": \"property\",\n \"data\": \"property\",\n \"_id\": \"14caa1c46414ee1\"\n },\n \"193f1166eb16609\": {\n \"_name\": \"_Metamodel\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"schema\": \"method\",\n \"model\": \"method\",\n \"type\": \"method\",\n \"create\": \"method\",\n \"_id\": \"193f1166eb16609\"\n },\n \"157931f7a31b61d\": {\n \"_id\": \"157931f7a31b61d\",\n \"_name\": \"_OSGi\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"install\": \"method\",\n \"uninstall\": \"method\",\n \"start\": \"method\",\n \"stop\": \"method\",\n \"status\": \"method\",\n \"bundle\": \"method\"\n },\n \"12e211d4cd120a6\": {\n \"_id\": \"12e211d4cd120a6\",\n \"_name\": \"_Runtime\",\n \"_inherit\": [\"_OSGi\"],\n \"_core\": true,\n \"version\": \"property\",\n \"system\": \"method\",\n \"message\": \"method\",\n \"ready\": \"event\"\n },\n \"1cb761fa4510dca\": {\n \"_id\": \"1cb761fa4510dca\",\n \"_name\": \"_System\",\n \"_inherit\": [\"_SystemOSGi\"],\n \"_core\": true,\n \"name\": \"property\",\n \"master\": \"property\",\n \"version\": \"property\",\n \"description\": \"property\",\n \"schemas\": \"property\",\n \"models\": \"property\",\n \"behaviors\": \"property\",\n \"types\": \"property\",\n \"components\": \"property\"\n },\n \"145fe10c7514298\": {\n \"_id\": \"145fe10c7514298\",\n \"_name\": \"_SystemOSGi\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"state\": \"property\",\n \"location\": \"property\",\n \"start\": \"method\",\n \"stop\": \"method\"\n },\n \"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n \"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n \"_name\": \"_History\",\n \"_core\": true,\n \"_inherit\": [\"_Component\"],\n \"back\": \"method\",\n \"forward\": \"method\",\n \"from\": \"method\",\n \"dump\": \"method\",\n \"get\": \"method\",\n \"load\": \"method\",\n \"start\": \"method\",\n \"stop\": \"method\",\n \"clear\": \"method\"\n }\n },\n \"models\": {\n \"166971fd9d107fd\": {\n \"_name\": \"_Behavior\",\n \"_core\": true,\n \"context\": {\n \"type\": \"any\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": null\n },\n \"core\": {\n \"type\": \"boolean\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"useCoreAPI\": {\n \"type\": \"any\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"component\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"action\": {\n \"type\": \"javascript\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"state\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"_id\": \"166971fd9d107fd\"\n },\n \"135c71078810af2\": {\n \"_id\": \"135c71078810af2\",\n \"_name\": \"_Channel\",\n \"_core\": true,\n \"send\": { \"params\": [{ \"name\": \"message\", \"type\": \"message\" }] },\n \"$systemInstalled\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemResolved\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemUninstalled\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemStarted\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemStopped\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n }\n },\n \"123751cb591de26\": {\n \"_id\": \"123751cb591de26\",\n \"_name\": \"_Component\",\n \"_core\": true,\n \"on\": {\n \"params\": [\n { \"name\": \"state\", \"type\": \"string\" },\n { \"name\": \"action\", \"type\": \"function\" },\n {\n \"name\": \"useCoreAPI\",\n \"type\": \"any\",\n \"mandatory\": false,\n \"default\": false\n },\n {\n \"name\": \"isCore\",\n \"type\": \"boolean\",\n \"mandatory\": false,\n \"default\": false\n }\n ]\n },\n \"off\": {\n \"params\": [\n { \"name\": \"state\", \"type\": \"string\", \"mandatory\": false },\n { \"name\": \"behaviorId\", \"type\": \"string\", \"mandatory\": false }\n ]\n },\n \"require\": { \"params\": [{ \"name\": \"id\", \"type\": \"string\" }] },\n \"destroy\": { \"params\": [] },\n \"init\": { \"params\": [{ \"name\": \"document\", \"type\": \"object\" }] },\n \"error\": { \"params\": [{ \"name\": \"e\", \"type\": \"errorInfo\" }] }\n },\n \"18a51169d7112d4\": {\n \"_name\": \"_Database\",\n \"_core\": true,\n \"collections\": { \"result\": \"object\" },\n \"insert\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbInsertEvent\" }] },\n \"update\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbUpdateEvent\" }] },\n \"remove\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbRemoveEvent\" }] },\n \"_id\": \"18a51169d7112d4\"\n },\n \"16b9d1ac2216ffe\": {\n \"_id\": \"16b9d1ac2216ffe\",\n \"_name\": \"_Logger\",\n \"_core\": true,\n \"level\": {\n \"type\": \"log\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"warn\"\n },\n \"debug\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"info\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"warn\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"error\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] }\n },\n \"1d9b6139411aa91\": {\n \"_name\": \"_Message\",\n \"_core\": true,\n \"event\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"from\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"data\": {\n \"type\": \"array\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": []\n },\n \"_id\": \"1d9b6139411aa91\"\n },\n \"1628c13c22152e6\": {\n \"_name\": \"_Metamodel\",\n \"_core\": true,\n \"schema\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"schema\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"model\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"model\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"type\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"type\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"create\": { \"params\": [] },\n \"_id\": \"1628c13c22152e6\"\n },\n \"100b91ed2211b15\": {\n \"_id\": \"100b91ed2211b15\",\n \"_name\": \"_OSGi\",\n \"install\": {\n \"params\": [\n { \"name\": \"url\", \"type\": \"any\", \"mandatory\": true, \"default\": \"\" },\n {\n \"name\": \"async\",\n \"type\": \"boolean\",\n \"mandatory\": false,\n \"default\": true\n }\n ],\n \"result\": \"string\"\n },\n \"uninstall\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"start\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"stop\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"status\": { \"result\": \"object\" },\n \"_core\": true,\n \"bundle\": { \"result\": \"string\" }\n },\n \"14c7c105b31a160\": {\n \"_id\": \"14c7c105b31a160\",\n \"_name\": \"_Runtime\",\n \"_core\": true,\n \"version\": {\n \"type\": \"string\",\n \"readOnly\": true,\n \"mandatory\": true,\n \"default\": \"6.0.0-beta.4\"\n },\n \"system\": {\n \"params\": [{ \"name\": \"params\", \"type\": \"any\", \"mandatory\": false }],\n \"result\": \"object\"\n },\n \"message\": {\n \"params\": [{ \"name\": \"msg\", \"type\": \"message\", \"mandatory\": true }]\n },\n \"ready\": {}\n },\n \"170521b88614387\": {\n \"_name\": \"_System\",\n \"_core\": true,\n \"name\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"master\": {\n \"type\": \"boolean\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"version\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"0.0.1\"\n },\n \"description\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"\"\n },\n \"schemas\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"models\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"behaviors\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"types\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"components\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"_id\": \"170521b88614387\"\n },\n \"1b2811b092143f5\": {\n \"_id\": \"1b2811b092143f5\",\n \"_name\": \"_SystemOSGi\",\n \"start\": {},\n \"stop\": {},\n \"_core\": true,\n \"state\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"none\"\n },\n \"location\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"\"\n }\n },\n \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n \"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n \"_name\": \"_History\",\n \"_description\": \"\",\n \"back\": { \"result\": \"number\" },\n \"forward\": { \"result\": \"number\" },\n \"dump\": { \"result\": \"string\" },\n \"_core\": true,\n \"from\": {\n \"params\": [\n {\n \"name\": \"index\",\n \"type\": \"number\",\n \"mandatory\": true,\n \"default\": -1\n }\n ],\n \"result\": \"any\"\n },\n \"get\": {\n \"params\": [\n {\n \"name\": \"index\",\n \"type\": \"number\",\n \"mandatory\": true,\n \"default\": -1\n }\n ],\n \"result\": \"object\"\n },\n \"load\": {\n \"params\": [\n { \"name\": \"dump\", \"type\": \"any\", \"mandatory\": true, \"default\": \"\" }\n ],\n \"result\": \"boolean\"\n },\n \"start\": { \"result\": \"any\" },\n \"stop\": { \"result\": \"any\" },\n \"clear\": { \"result\": \"any\" }\n }\n },\n \"behaviors\": {\n \"12e491859c13918\": {\n \"_id\": \"12e491859c13918\",\n \"component\": \"_Channel\",\n \"state\": \"$systemStarted\",\n \"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1e9021bd4e1bc6e\": {\n \"_id\": \"1e9021bd4e1bc6e\",\n \"component\": \"_Channel\",\n \"state\": \"$systemInstalled\",\n \"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1ba721201114b6b\": {\n \"_id\": \"1ba721201114b6b\",\n \"component\": \"_Component\",\n \"state\": \"destroy\",\n \"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"15486186f41a48c\": {\n \"_id\": \"15486186f41a48c\",\n \"component\": \"_Component\",\n \"state\": \"off\",\n \"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1da0a17878104c3\": {\n \"_id\": \"1da0a17878104c3\",\n \"component\": \"_Component\",\n \"state\": \"require\",\n \"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1a5111d17a1800c\": {\n \"_id\": \"1a5111d17a1800c\",\n \"component\": \"_Database\",\n \"state\": \"collections\",\n \"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1d993108fa18ef2\": {\n \"_id\": \"1d993108fa18ef2\",\n \"component\": \"_Logger\",\n \"state\": \"debug\",\n \"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"1a37a188e11fe73\": {\n \"_id\": \"1a37a188e11fe73\",\n \"component\": \"_Logger\",\n \"state\": \"error\",\n \"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"1edd21e12a16534\": {\n \"_id\": \"1edd21e12a16534\",\n \"component\": \"_Logger\",\n \"state\": \"info\",\n \"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"141f2143d3122a4\": {\n \"_id\": \"141f2143d3122a4\",\n \"component\": \"_Logger\",\n \"state\": \"level\",\n \"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"192401bab21304e\": {\n \"_id\": \"192401bab21304e\",\n \"component\": \"_Logger\",\n \"state\": \"warn\",\n \"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"11fc715e2f1a31e\": {\n \"_id\": \"11fc715e2f1a31e\",\n \"component\": \"_Metamodel\",\n \"state\": \"create\",\n \"action\": \"function create() {\\n $metamodel.create();\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1232f1f107142cf\": {\n \"_id\": \"1232f1f107142cf\",\n \"component\": \"_Metamodel\",\n \"state\": \"model\",\n \"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1365412f69153d2\": {\n \"_id\": \"1365412f69153d2\",\n \"component\": \"_Metamodel\",\n \"state\": \"schema\",\n \"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"194db147fe161a2\": {\n \"_id\": \"194db147fe161a2\",\n \"component\": \"_Metamodel\",\n \"state\": \"type\",\n \"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1ef951f1411b895\": {\n \"_id\": \"1ef951f1411b895\",\n \"component\": \"_OSGi\",\n \"state\": \"install\",\n \"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"14c1517b711cb78\": {\n \"_id\": \"14c1517b711cb78\",\n \"component\": \"_OSGi\",\n \"state\": \"uninstall\",\n \"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"105f219c6813643\": {\n \"_id\": \"105f219c6813643\",\n \"component\": \"_OSGi\",\n \"state\": \"start\",\n \"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n \"useCoreAPI\": false,\n \"core\": true\n },\n \"1a81a1f00d17269\": {\n \"_id\": \"1a81a1f00d17269\",\n \"component\": \"_OSGi\",\n \"state\": \"stop\",\n \"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n \"useCoreAPI\": false,\n \"core\": true\n },\n \"116851b602128d1\": {\n \"_id\": \"116851b602128d1\",\n \"component\": \"_OSGi\",\n \"state\": \"status\",\n \"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"19cf317d7217331\": {\n \"_id\": \"19cf317d7217331\",\n \"component\": \"_OSGi\",\n \"state\": \"bundle\",\n \"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"13010167f313f87\": {\n \"_id\": \"13010167f313f87\",\n \"component\": \"_Runtime\",\n \"state\": \"system\",\n \"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1cfa4145f614da8\": {\n \"_id\": \"1cfa4145f614da8\",\n \"component\": \"_Runtime\",\n \"state\": \"message\",\n \"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1cb9d103d41dd97\": {\n \"_id\": \"1cb9d103d41dd97\",\n \"component\": \"e89c617b6b15d24\",\n \"state\": \"start\",\n \"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n \"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n \"component\": \"_History\",\n \"state\": \"back\",\n \"action\": \"function back() { \\n return $history.back();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n \"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n \"component\": \"_History\",\n \"state\": \"forward\",\n \"action\": \"function forward() { \\n return $history.forward();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n \"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n \"component\": \"_History\",\n \"state\": \"dump\",\n \"action\": \"function dump() { \\n return $history.dump();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"f06254ad-187e-400c-a582-b5ab81f24747\": {\n \"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n \"component\": \"_History\",\n \"state\": \"get\",\n \"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n \"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n \"component\": \"_History\",\n \"state\": \"from\",\n \"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n \"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n \"component\": \"_History\",\n \"state\": \"load\",\n \"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n \"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n \"component\": \"_History\",\n \"state\": \"start\",\n \"action\": \"function start() { \\n return $history.start();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n \"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n \"component\": \"_History\",\n \"state\": \"stop\",\n \"action\": \"function stop() { \\n return $history.stop();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n \"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n \"component\": \"_History\",\n \"state\": \"clear\",\n \"action\": \"function clear() { \\n return $history.clear();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n }\n },\n \"types\": {\n \"css\": {\n \"_id\": \"h1d88311ac019211\",\n \"name\": \"css\",\n \"type\": \"string\",\n \"core\": true\n },\n \"date\": {\n \"_id\": \"c17cad1bc3d17752\",\n \"name\": \"date\",\n \"type\": \"object\",\n \"core\": true\n },\n \"json\": {\n \"_id\": \"e1d25a12e67127ed\",\n \"name\": \"json\",\n \"type\": \"object\",\n \"core\": true\n },\n \"dbInsertEvent\": {\n \"_id\": \"148ef1e19810e6d\",\n \"core\": true,\n \"name\": \"dbInsertEvent\",\n \"type\": \"object\",\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"document\": { \"type\": \"object\", \"mandatory\": true, \"default\": {} }\n }\n },\n \"dbRemoveEvent\": {\n \"_id\": \"1952e1ac4213f4a\",\n \"name\": \"dbRemoveEvent\",\n \"type\": \"object\",\n \"core\": true,\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"id\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n }\n },\n \"dbUpdateEvent\": {\n \"_id\": \"1f5c41309711752\",\n \"core\": true,\n \"name\": \"dbUpdateEvent\",\n \"type\": \"object\",\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"id\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"field\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"value\": { \"type\": \"any\", \"mandatory\": true, \"default\": null }\n }\n },\n \"collection\": {\n \"_id\": \"d1c0d0130c616199\",\n \"name\": \"collection\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": [\"string\"], \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"array\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false },\n \"kind\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"event\": {\n \"_id\": \"g1668d1de2d1ff6f\",\n \"name\": \"event\",\n \"type\": \"object\",\n \"schema\": {\n \"params\": { \"type\": [\"parameter\"], \"mandatory\": false },\n \"description\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"html\": {\n \"_id\": \"y161c21320b11acb\",\n \"name\": \"html\",\n \"type\": \"string\",\n \"core\": true\n },\n \"javascript\": {\n \"_id\": \"s13d4c1fdf916504\",\n \"name\": \"javascript\",\n \"type\": \"string\",\n \"core\": true\n },\n \"link\": {\n \"_id\": \"p124601801d1dbfa\",\n \"name\": \"link\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": \"string\", \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"{type}\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false },\n \"kind\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"log\": {\n \"_id\": \"d1fd161a4a4149fc\",\n \"name\": \"log\",\n \"type\": \"string\",\n \"value\": [\"debug\", \"info\", \"warn\", \"error\", \"off\"],\n \"core\": true\n },\n \"message\": {\n \"_id\": \"l13b061ac571272d\",\n \"name\": \"message\",\n \"type\": \"object\",\n \"schema\": {\n \"event\": { \"type\": \"string\", \"mandatory\": true },\n \"from\": { \"type\": \"string\", \"mandatory\": false },\n \"data\": { \"type\": \"array\", \"mandatory\": true }\n },\n \"core\": true\n },\n \"method\": {\n \"_id\": \"x1227218eed1f3e9\",\n \"name\": \"method\",\n \"type\": \"object\",\n \"schema\": {\n \"result\": { \"type\": \"any\", \"mandatory\": false },\n \"params\": { \"type\": [\"parameter\"], \"mandatory\": false },\n \"description\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"osgiStates\": {\n \"_id\": \"q1f0ca120fc13fb3\",\n \"name\": \"osgiStates\",\n \"type\": \"string\",\n \"value\": [\n \"none\",\n \"installed\",\n \"resolved\",\n \"starting\",\n \"active\",\n \"stopping\",\n \"uninstalled\"\n ],\n \"core\": true\n },\n \"parameter\": {\n \"_id\": \"e1b18e16c6c195ad\",\n \"name\": \"parameter\",\n \"type\": \"object\",\n \"schema\": {\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"name\": { \"type\": \"string\", \"mandatory\": true },\n \"type\": { \"type\": \"any\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": false },\n \"default\": { \"type\": \"{type}\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"property\": {\n \"_id\": \"a16a3a1ae051a55d\",\n \"name\": \"property\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": \"string\", \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"{type}\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"text\": {\n \"_id\": \"c136fc129a912f54\",\n \"name\": \"text\",\n \"type\": \"string\",\n \"core\": true\n },\n \"errorInfo\": {\n \"_id\": \"e198761fc0b1ae8a\",\n \"name\": \"errorInfo\",\n \"type\": \"object\",\n \"schema\": {\n \"message\": { \"type\": \"string\", \"mandatory\": true },\n \"stack\": { \"type\": \"object\", \"mandatory\": true }\n },\n \"core\": true\n }\n },\n \"components\": {\n \"_Channel\": { \"channel\": { \"_id\": \"channel\" } },\n \"_Database\": { \"db\": { \"_id\": \"db\" } },\n \"_Logger\": { \"logger\": { \"_id\": \"logger\", \"level\": \"warn\" } },\n \"_Metamodel\": { \"metamodel\": { \"_id\": \"metamodel\" } },\n \"_Runtime\": { \"runtime\": { \"_id\": \"runtime\", \"version\": \"6.0.0-beta.4\" } },\n \"_History\": { \"history\": { \"_id\": \"history\" } }\n },\n \"_id\": \"e89c617b6b15d24\"\n}\n\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,CAAC,WAAY,aAAc,OAAQ,SAAU,SAiHlEC,cA/GoB,CACpB,UACA,SACA,SACA,SACA,WACA,QACA,OACA,OAwGAC,kBArGwB,CACxBC,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,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,WAAa,GAC5C6V,MAAS,CAAE9V,KAAQ,SAAUC,WAAa,IAE5CY,MAAQ,IAGZke,WAAc,CACZS,SAAY,CAAEY,QAAW,CAAErgB,IAAO,YAClC+hB,UAAa,CAAEC,GAAM,CAAEhiB,IAAO,OAC9BqC,QAAW,CAAE4f,OAAU,CAAEjiB,IAAO,SAAUmB,MAAS,SACnD+gB,WAAc,CAAEC,UAAa,CAAEniB,IAAO,cACtC6I,SAAY,CAAEuZ,QAAW,CAAEpiB,IAAO,UAAW2e,QAAW,iBACxD0D,SAAY,CAAEC,QAAW,CAAEtiB,IAAO,aAEpCA,IAAO,oBD/7BTiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c6f113e..49db54c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,9 +16,7 @@ "eslint-plugin-mocha": "10.1.0", "grunt": "1.5.3", "grunt-cli": "1.4.3", - "grunt-contrib-clean": "2.0.1", "grunt-contrib-concat": "2.1.0", - "grunt-json-merge": "0.2.2", "husky": "8.0.1", "lint-staged": "13.0.3", "load-grunt-tasks": "5.1.0", @@ -33,8 +31,9 @@ }, "node_modules/@colors/colors": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, - "license": "MIT", "optional": true, "engines": { "node": ">=0.1.90" @@ -42,8 +41,9 @@ }, "node_modules/@cypress/request": { "version": "2.88.10", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", + "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -70,8 +70,9 @@ }, "node_modules/@cypress/xvfb": { "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^3.1.0", "lodash.once": "^4.1.1" @@ -79,16 +80,18 @@ }, "node_modules/@cypress/xvfb/node_modules/debug": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/@eslint/eslintrc": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -109,8 +112,9 @@ }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -122,8 +126,9 @@ }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -134,13 +139,15 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -152,24 +159,27 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -177,13 +187,15 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", "dev": true, - "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -191,8 +203,9 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -203,16 +216,18 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -223,8 +238,9 @@ }, "node_modules/@rollup/plugin-terser": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", + "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", "dev": true, - "license": "MIT", "dependencies": { "terser": "^5.15.1" }, @@ -242,28 +258,33 @@ }, "node_modules/@types/minimatch": { "version": "3.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true }, "node_modules/@types/node": { "version": "14.18.33", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", + "dev": true }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true }, "node_modules/@types/sizzle": { "version": "2.3.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true }, "node_modules/@types/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" @@ -271,18 +292,21 @@ }, "node_modules/@zeit/schemas": { "version": "2.21.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", + "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", + "dev": true }, "node_modules/abbrev": { "version": "1.1.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true }, "node_modules/accepts": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, - "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -293,8 +317,9 @@ }, "node_modules/acorn": { "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -304,16 +329,18 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/aggregate-error": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, - "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -324,8 +351,9 @@ }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -339,24 +367,27 @@ }, "node_modules/ansi-align": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.1.0" } }, "node_modules/ansi-colors": { "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -369,8 +400,9 @@ }, "node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -380,16 +412,18 @@ }, "node_modules/ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -402,8 +436,9 @@ }, "node_modules/anymatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -414,6 +449,8 @@ }, "node_modules/arch": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true, "funding": [ { @@ -428,129 +465,147 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/arg": { "version": "5.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true }, "node_modules/argparse": { "version": "2.0.1", - "dev": true, - "license": "Python-2.0" + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-differ": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/array-each": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/array-slice": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/arrify": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/asn1": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } }, "node_modules/assert-plus": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8" } }, "node_modules/assertion-error": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/astral-regex": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/async": { "version": "3.2.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true }, "node_modules/asynckit": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "node_modules/at-least-node": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "license": "ISC", "engines": { "node": ">= 4.0.0" } }, "node_modules/aws-sign2": { "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { "version": "1.11.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { @@ -565,39 +620,43 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } }, "node_modules/binary-extensions": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/blob-util": { "version": "2.0.2", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true }, "node_modules/bluebird": { "version": "3.7.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true }, "node_modules/boxen": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^7.0.0", @@ -617,8 +676,9 @@ }, "node_modules/boxen/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -628,8 +688,9 @@ }, "node_modules/boxen/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -639,8 +700,9 @@ }, "node_modules/boxen/node_modules/chalk": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", + "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", "dev": true, - "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -650,13 +712,15 @@ }, "node_modules/boxen/node_modules/emoji-regex": { "version": "9.2.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true }, "node_modules/boxen/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -671,8 +735,9 @@ }, "node_modules/boxen/node_modules/strip-ansi": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -685,8 +750,9 @@ }, "node_modules/boxen/node_modules/type-fest": { "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=12.20" }, @@ -696,8 +762,9 @@ }, "node_modules/boxen/node_modules/wrap-ansi": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -712,8 +779,9 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -721,8 +789,9 @@ }, "node_modules/braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "license": "MIT", "dependencies": { "fill-range": "^7.0.1" }, @@ -732,11 +801,14 @@ }, "node_modules/browser-stdout": { "version": "1.3.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true }, "node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -752,7 +824,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -760,45 +831,51 @@ }, "node_modules/buffer-crc32": { "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/buffer-from": { "version": "1.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/bytes": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/cachedir": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.16" }, @@ -808,13 +885,15 @@ }, "node_modules/caseless": { "version": "0.12.0", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true }, "node_modules/chai": { "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, - "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", @@ -830,8 +909,9 @@ }, "node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -845,8 +925,9 @@ }, "node_modules/chalk-template": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.2" }, @@ -859,8 +940,9 @@ }, "node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -870,22 +952,26 @@ }, "node_modules/check-error": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/check-more-types": { "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/chokidar": { "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "funding": [ { @@ -893,7 +979,6 @@ "url": "https://paulmillr.com/funding/" } ], - "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -912,8 +997,9 @@ }, "node_modules/chokidar/node_modules/glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.1" }, @@ -923,21 +1009,24 @@ }, "node_modules/ci-info": { "version": "3.5.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "dev": true }, "node_modules/clean-stack": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/cli-boxes": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -947,8 +1036,9 @@ }, "node_modules/cli-cursor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, - "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" }, @@ -958,8 +1048,9 @@ }, "node_modules/cli-table3": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, - "license": "MIT", "dependencies": { "string-width": "^4.2.0" }, @@ -972,8 +1063,9 @@ }, "node_modules/cli-truncate": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, - "license": "MIT", "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^5.0.0" @@ -987,8 +1079,9 @@ }, "node_modules/cli-truncate/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -998,13 +1091,15 @@ }, "node_modules/cli-truncate/node_modules/emoji-regex": { "version": "9.2.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true }, "node_modules/cli-truncate/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -1019,8 +1114,9 @@ }, "node_modules/cli-truncate/node_modules/strip-ansi": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -1033,8 +1129,9 @@ }, "node_modules/clipboardy": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", + "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", "dev": true, - "license": "MIT", "dependencies": { "arch": "^2.2.0", "execa": "^5.1.1", @@ -1049,8 +1146,9 @@ }, "node_modules/clipboardy/node_modules/execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -1071,8 +1169,9 @@ }, "node_modules/clipboardy/node_modules/get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -1082,16 +1181,18 @@ }, "node_modules/clipboardy/node_modules/human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/cliui": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -1100,8 +1201,9 @@ }, "node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1111,26 +1213,30 @@ }, "node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/colorette": { "version": "2.0.19", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true }, "node_modules/colors": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.1.90" } }, "node_modules/combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1140,24 +1246,27 @@ }, "node_modules/commander": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/common-tags": { "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/compressible": { "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": ">= 1.43.0 < 2" }, @@ -1167,8 +1276,9 @@ }, "node_modules/compression": { "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, - "license": "MIT", "dependencies": { "accepts": "~1.3.5", "bytes": "3.0.0", @@ -1184,44 +1294,51 @@ }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.0.0" } }, "node_modules/compression/node_modules/ms": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true }, "node_modules/compression/node_modules/safe-buffer": { "version": "5.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/content-disposition": { "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/core-util-is": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1233,9 +1350,10 @@ }, "node_modules/cypress": { "version": "10.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", + "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", "dev": true, "hasInstallScript": true, - "license": "MIT", "dependencies": { "@cypress/request": "^2.88.10", "@cypress/xvfb": "^1.2.4", @@ -1289,8 +1407,9 @@ }, "node_modules/dashdash": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1300,21 +1419,24 @@ }, "node_modules/dateformat": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/dayjs": { "version": "1.11.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", + "dev": true }, "node_modules/debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -1329,8 +1451,9 @@ }, "node_modules/decamelize": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -1340,8 +1463,9 @@ }, "node_modules/deep-eql": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, - "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, @@ -1351,45 +1475,51 @@ }, "node_modules/deep-extend": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/deep-is": { "version": "0.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/detect-file": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" }, @@ -1399,13 +1529,15 @@ }, "node_modules/eastasianwidth": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true }, "node_modules/ecc-jsbn": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, - "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -1413,21 +1545,24 @@ }, "node_modules/emoji-regex": { "version": "8.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "license": "MIT", "dependencies": { "once": "^1.4.0" } }, "node_modules/enquirer": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1" }, @@ -1437,16 +1572,18 @@ }, "node_modules/escalade": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -1456,8 +1593,9 @@ }, "node_modules/eslint": { "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, - "license": "MIT", "dependencies": { "@eslint/eslintrc": "^1.3.3", "@humanwhocodes/config-array": "^0.11.6", @@ -1511,8 +1649,9 @@ }, "node_modules/eslint-plugin-mocha": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", "dev": true, - "license": "MIT", "dependencies": { "eslint-utils": "^3.0.0", "rambda": "^7.1.0" @@ -1526,8 +1665,9 @@ }, "node_modules/eslint-scope": { "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1538,8 +1678,9 @@ }, "node_modules/eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, - "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -1555,24 +1696,27 @@ }, "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10" } }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/espree": { "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", @@ -1587,8 +1731,9 @@ }, "node_modules/esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -1599,8 +1744,9 @@ }, "node_modules/esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1610,8 +1756,9 @@ }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1621,29 +1768,33 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/eventemitter2": { "version": "6.4.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true }, "node_modules/execa": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -1664,8 +1815,9 @@ }, "node_modules/executable": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, - "license": "MIT", "dependencies": { "pify": "^2.2.0" }, @@ -1675,6 +1827,8 @@ }, "node_modules/exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -1682,8 +1836,9 @@ }, "node_modules/expand-tilde": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, - "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.1" }, @@ -1693,13 +1848,15 @@ }, "node_modules/extend": { "version": "3.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "node_modules/extract-zip": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -1717,55 +1874,63 @@ }, "node_modules/extsprintf": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, "engines": [ "node >=0.6.0" - ], - "license": "MIT" + ] }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, "node_modules/fast-url-parser": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", "dev": true, - "license": "MIT", "dependencies": { "punycode": "^1.3.2" } }, "node_modules/fastq": { "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } }, "node_modules/fd-slicer": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, - "license": "MIT", "dependencies": { "pend": "~1.2.0" } }, "node_modules/figures": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, - "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -1778,16 +1943,18 @@ }, "node_modules/figures/node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, - "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" }, @@ -1797,8 +1964,9 @@ }, "node_modules/fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1808,8 +1976,9 @@ }, "node_modules/find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1823,6 +1992,8 @@ }, "node_modules/findup-sync": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", "dev": true, "dependencies": { "glob": "~5.0.0" @@ -1833,8 +2004,9 @@ }, "node_modules/findup-sync/node_modules/glob": { "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, - "license": "ISC", "dependencies": { "inflight": "^1.0.4", "inherits": "2", @@ -1848,8 +2020,9 @@ }, "node_modules/fined": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, - "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", "is-plain-object": "^2.0.3", @@ -1863,24 +2036,27 @@ }, "node_modules/flagged-respawn": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "license": "BSD-3-Clause", "bin": { "flat": "cli.js" } }, "node_modules/flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, - "license": "MIT", "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -1891,21 +2067,24 @@ }, "node_modules/flatted": { "version": "3.2.7", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true }, "node_modules/for-in": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/for-own": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", "dev": true, - "license": "MIT", "dependencies": { "for-in": "^1.0.1" }, @@ -1915,16 +2094,18 @@ }, "node_modules/forever-agent": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -1936,8 +2117,9 @@ }, "node_modules/fs-extra": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, - "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -1950,13 +2132,16 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "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, - "license": "MIT", + "hasInstallScript": true, "optional": true, "os": [ "darwin" @@ -1967,29 +2152,33 @@ }, "node_modules/function-bind": { "version": "1.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "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": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/get-stream": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, - "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -2002,6 +2191,8 @@ }, "node_modules/getobject": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true, "engines": { "node": ">=10" @@ -2009,24 +2200,27 @@ }, "node_modules/getos": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, - "license": "MIT", "dependencies": { "async": "^3.2.0" } }, "node_modules/getpass": { "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } }, "node_modules/glob": { "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2044,8 +2238,9 @@ }, "node_modules/glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -2055,8 +2250,9 @@ }, "node_modules/global-dirs": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, - "license": "MIT", "dependencies": { "ini": "2.0.0" }, @@ -2069,8 +2265,9 @@ }, "node_modules/global-modules": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, - "license": "MIT", "dependencies": { "global-prefix": "^1.0.1", "is-windows": "^1.0.1", @@ -2082,8 +2279,9 @@ }, "node_modules/global-prefix": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, - "license": "MIT", "dependencies": { "expand-tilde": "^2.0.2", "homedir-polyfill": "^1.0.1", @@ -2097,13 +2295,15 @@ }, "node_modules/global-prefix/node_modules/ini": { "version": "1.3.8", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/global-prefix/node_modules/which": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2113,8 +2313,9 @@ }, "node_modules/globals": { "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -2127,18 +2328,21 @@ }, "node_modules/graceful-fs": { "version": "4.2.10", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true }, "node_modules/grapheme-splitter": { "version": "1.0.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true }, "node_modules/grunt": { "version": "1.5.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", + "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", "dev": true, - "license": "MIT", "dependencies": { "dateformat": "~3.0.3", "eventemitter2": "~0.4.13", @@ -2165,8 +2369,9 @@ }, "node_modules/grunt-cli": { "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", "dev": true, - "license": "MIT", "dependencies": { "grunt-known-options": "~2.0.0", "interpret": "~1.1.0", @@ -2183,8 +2388,9 @@ }, "node_modules/grunt-cli/node_modules/nopt": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, - "license": "ISC", "dependencies": { "abbrev": "1", "osenv": "^0.1.4" @@ -2193,36 +2399,11 @@ "nopt": "bin/nopt.js" } }, - "node_modules/grunt-contrib-clean": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "async": "^3.2.3", - "rimraf": "^2.6.2" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "grunt": ">=0.4.5" - } - }, - "node_modules/grunt-contrib-clean/node_modules/rimraf": { - "version": "2.7.1", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/grunt-contrib-concat": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.2", "source-map": "^0.5.3" @@ -2234,32 +2415,20 @@ "grunt": ">=1.4.1" } }, - "node_modules/grunt-json-merge": { - "version": "0.2.2", - "dev": true, - "dependencies": { - "underscore": "^1.6.0", - "underscore-deep-extend": "0.0.3" - }, - "engines": { - "node": ">= 0.8.0" - }, - "peerDependencies": { - "grunt": ">=0.4" - } - }, "node_modules/grunt-known-options": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/grunt-legacy-log": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, - "license": "MIT", "dependencies": { "colors": "~1.1.2", "grunt-legacy-log-utils": "~2.1.0", @@ -2272,8 +2441,9 @@ }, "node_modules/grunt-legacy-log-utils": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "~4.1.0", "lodash": "~4.17.19" @@ -2284,8 +2454,9 @@ }, "node_modules/grunt-legacy-util": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", "dev": true, - "license": "MIT", "dependencies": { "async": "~3.2.0", "exit": "~0.1.2", @@ -2301,21 +2472,24 @@ }, "node_modules/grunt/node_modules/argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" } }, "node_modules/grunt/node_modules/eventemitter2": { "version": "0.4.14", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", + "dev": true }, "node_modules/grunt/node_modules/js-yaml": { "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -2326,8 +2500,9 @@ }, "node_modules/grunt/node_modules/minimatch": { "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -2337,13 +2512,15 @@ }, "node_modules/grunt/node_modules/sprintf-js": { "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true }, "node_modules/has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1" }, @@ -2353,24 +2530,27 @@ }, "node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/he": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "license": "MIT", "bin": { "he": "bin/he" } }, "node_modules/homedir-polyfill": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, - "license": "MIT", "dependencies": { "parse-passwd": "^1.0.0" }, @@ -2380,6 +2560,8 @@ }, "node_modules/hooker": { "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", "dev": true, "engines": { "node": "*" @@ -2387,8 +2569,9 @@ }, "node_modules/http-signature": { "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", @@ -2400,16 +2583,18 @@ }, "node_modules/human-signals": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=8.12.0" } }, "node_modules/husky": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true, - "license": "MIT", "bin": { "husky": "lib/bin.js" }, @@ -2422,8 +2607,9 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -2433,6 +2619,8 @@ }, "node_modules/ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { @@ -2447,21 +2635,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/ignore": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2475,24 +2664,27 @@ }, "node_modules/imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2500,26 +2692,30 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ini": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/interpret": { "version": "1.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", + "dev": true }, "node_modules/is-absolute": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, - "license": "MIT", "dependencies": { "is-relative": "^1.0.0", "is-windows": "^1.0.1" @@ -2530,8 +2726,9 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -2541,8 +2738,9 @@ }, "node_modules/is-ci": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, - "license": "MIT", "dependencies": { "ci-info": "^3.2.0" }, @@ -2552,8 +2750,9 @@ }, "node_modules/is-core-module": { "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, - "license": "MIT", "dependencies": { "has": "^1.0.3" }, @@ -2563,8 +2762,9 @@ }, "node_modules/is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "license": "MIT", "bin": { "is-docker": "cli.js" }, @@ -2577,16 +2777,18 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -2596,8 +2798,9 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -2607,8 +2810,9 @@ }, "node_modules/is-installed-globally": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, - "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" @@ -2622,32 +2826,36 @@ }, "node_modules/is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.12.0" } }, "node_modules/is-path-inside": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-obj": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-object": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -2657,8 +2865,9 @@ }, "node_modules/is-port-reachable": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", + "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", "dev": true, - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -2668,8 +2877,9 @@ }, "node_modules/is-relative": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, - "license": "MIT", "dependencies": { "is-unc-path": "^1.0.0" }, @@ -2679,8 +2889,9 @@ }, "node_modules/is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -2690,13 +2901,15 @@ }, "node_modules/is-typedarray": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true }, "node_modules/is-unc-path": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, - "license": "MIT", "dependencies": { "unc-path-regex": "^0.1.2" }, @@ -2706,8 +2919,9 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2717,16 +2931,18 @@ }, "node_modules/is-windows": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, - "license": "MIT", "dependencies": { "is-docker": "^2.0.0" }, @@ -2736,31 +2952,36 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/isstream": { "version": "0.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true }, "node_modules/js-sdsl": { "version": "4.1.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -2770,33 +2991,39 @@ }, "node_modules/jsbn": { "version": "0.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true }, "node_modules/json-schema": { "version": "0.4.0", - "dev": true, - "license": "(AFL-2.1 OR BSD-3-Clause)" + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true }, "node_modules/json-stringify-safe": { "version": "5.0.1", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, "node_modules/jsonfile": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, - "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -2806,11 +3033,12 @@ }, "node_modules/jsprim": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "engines": [ "node >=0.6.0" ], - "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -2820,24 +3048,27 @@ }, "node_modules/kind-of": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/lazy-ass": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true, - "license": "MIT", "engines": { "node": "> 0.8" } }, "node_modules/levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -2848,8 +3079,9 @@ }, "node_modules/liftup": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", + "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", "dev": true, - "license": "MIT", "dependencies": { "extend": "^3.0.2", "findup-sync": "^4.0.0", @@ -2866,8 +3098,9 @@ }, "node_modules/liftup/node_modules/findup-sync": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, - "license": "MIT", "dependencies": { "detect-file": "^1.0.0", "is-glob": "^4.0.0", @@ -2880,16 +3113,18 @@ }, "node_modules/lilconfig": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/lint-staged": { "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", "dev": true, - "license": "MIT", "dependencies": { "cli-truncate": "^3.1.0", "colorette": "^2.0.17", @@ -2917,16 +3152,18 @@ }, "node_modules/lint-staged/node_modules/commander": { "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", "dev": true, - "license": "MIT", "engines": { "node": "^12.20.0 || >=14" } }, "node_modules/lint-staged/node_modules/execa": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.1", @@ -2947,8 +3184,9 @@ }, "node_modules/lint-staged/node_modules/get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -2958,24 +3196,27 @@ }, "node_modules/lint-staged/node_modules/human-signals": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=12.20.0" } }, "node_modules/lint-staged/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/lint-staged/node_modules/is-stream": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -2985,8 +3226,9 @@ }, "node_modules/lint-staged/node_modules/listr2": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", + "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", "dev": true, - "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -3011,8 +3253,9 @@ }, "node_modules/lint-staged/node_modules/listr2/node_modules/cli-truncate": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, - "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -3026,8 +3269,9 @@ }, "node_modules/lint-staged/node_modules/mimic-fn": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -3037,8 +3281,9 @@ }, "node_modules/lint-staged/node_modules/npm-run-path": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^4.0.0" }, @@ -3051,8 +3296,9 @@ }, "node_modules/lint-staged/node_modules/onetime": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, - "license": "MIT", "dependencies": { "mimic-fn": "^4.0.0" }, @@ -3065,8 +3311,9 @@ }, "node_modules/lint-staged/node_modules/path-key": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -3076,8 +3323,9 @@ }, "node_modules/lint-staged/node_modules/slice-ansi": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -3089,8 +3337,9 @@ }, "node_modules/lint-staged/node_modules/strip-final-newline": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -3100,8 +3349,9 @@ }, "node_modules/listr2": { "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, - "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", @@ -3126,8 +3376,9 @@ }, "node_modules/listr2/node_modules/cli-truncate": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, - "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" @@ -3141,16 +3392,18 @@ }, "node_modules/listr2/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/listr2/node_modules/slice-ansi": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -3162,8 +3415,9 @@ }, "node_modules/load-grunt-tasks": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", + "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", "dev": true, - "license": "MIT", "dependencies": { "arrify": "^2.0.1", "multimatch": "^4.0.0", @@ -3179,8 +3433,9 @@ }, "node_modules/locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -3193,23 +3448,27 @@ }, "node_modules/lodash": { "version": "4.17.21", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/lodash.merge": { "version": "4.6.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/lodash.once": { "version": "4.1.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true }, "node_modules/log-symbols": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -3223,8 +3482,9 @@ }, "node_modules/log-update": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", @@ -3240,16 +3500,18 @@ }, "node_modules/log-update/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/log-update/node_modules/slice-ansi": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", @@ -3264,8 +3526,9 @@ }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -3277,16 +3540,18 @@ }, "node_modules/loupe": { "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", "dev": true, - "license": "MIT", "dependencies": { "get-func-name": "^2.0.0" } }, "node_modules/lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -3296,8 +3561,9 @@ }, "node_modules/make-iterator": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, - "license": "MIT", "dependencies": { "kind-of": "^6.0.2" }, @@ -3307,21 +3573,24 @@ }, "node_modules/map-cache": { "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/merge-stream": { "version": "2.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true }, "node_modules/micromatch": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, - "license": "MIT", "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" @@ -3332,16 +3601,18 @@ }, "node_modules/mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -3351,16 +3622,18 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3370,16 +3643,18 @@ }, "node_modules/minimist": { "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/mkdirp": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "license": "MIT", "bin": { "mkdirp": "bin/cmd.js" }, @@ -3389,8 +3664,9 @@ }, "node_modules/mocha": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, - "license": "MIT", "dependencies": { "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", @@ -3428,16 +3704,18 @@ }, "node_modules/mocha/node_modules/ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3455,8 +3733,9 @@ }, "node_modules/mocha/node_modules/glob/node_modules/minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3466,8 +3745,9 @@ }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -3477,26 +3757,30 @@ }, "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/mocha/node_modules/ms": { "version": "2.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, "node_modules/ms": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/multimatch": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/minimatch": "^3.0.3", "array-differ": "^3.0.0", @@ -3510,8 +3794,9 @@ }, "node_modules/nanoid": { "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3521,21 +3806,24 @@ }, "node_modules/natural-compare": { "version": "1.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/nopt": { "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, - "license": "ISC", "dependencies": { "abbrev": "1" }, @@ -3545,16 +3833,18 @@ }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-path": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -3564,16 +3854,18 @@ }, "node_modules/object-inspect": { "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object.defaults": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", "dev": true, - "license": "MIT", "dependencies": { "array-each": "^1.0.1", "array-slice": "^1.0.0", @@ -3586,8 +3878,9 @@ }, "node_modules/object.map": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", "dev": true, - "license": "MIT", "dependencies": { "for-own": "^1.0.0", "make-iterator": "^1.0.0" @@ -3598,8 +3891,9 @@ }, "node_modules/object.pick": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, - "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -3609,24 +3903,27 @@ }, "node_modules/on-headers": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/onetime": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -3639,8 +3936,9 @@ }, "node_modules/optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, - "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -3655,24 +3953,27 @@ }, "node_modules/os-homedir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/os-tmpdir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/osenv": { "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, - "license": "ISC", "dependencies": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -3680,13 +3981,15 @@ }, "node_modules/ospath": { "version": "1.2.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true }, "node_modules/p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -3699,8 +4002,9 @@ }, "node_modules/p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -3713,8 +4017,9 @@ }, "node_modules/p-map": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, - "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, @@ -3727,16 +4032,18 @@ }, "node_modules/p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -3746,8 +4053,9 @@ }, "node_modules/parse-filepath": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", "dev": true, - "license": "MIT", "dependencies": { "is-absolute": "^1.0.0", "map-cache": "^0.2.0", @@ -3759,50 +4067,57 @@ }, "node_modules/parse-passwd": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-is-inside": { "version": "1.0.2", - "dev": true, - "license": "(WTFPL OR MIT)" + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true }, "node_modules/path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, "node_modules/path-root": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", "dev": true, - "license": "MIT", "dependencies": { "path-root-regex": "^0.1.0" }, @@ -3812,39 +4127,45 @@ }, "node_modules/path-root-regex": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-to-regexp": { "version": "2.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true }, "node_modules/pathval": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, - "license": "MIT", "engines": { "node": "*" } }, "node_modules/pend": { "version": "1.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true }, "node_modules/performance-now": { "version": "2.1.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -3854,8 +4175,9 @@ }, "node_modules/pidtree": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true, - "license": "MIT", "bin": { "pidtree": "bin/pidtree.js" }, @@ -3865,16 +4187,18 @@ }, "node_modules/pify": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/pkg-up": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", "dev": true, - "license": "MIT", "dependencies": { "find-up": "^3.0.0" }, @@ -3884,8 +4208,9 @@ }, "node_modules/pkg-up/node_modules/find-up": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "license": "MIT", "dependencies": { "locate-path": "^3.0.0" }, @@ -3895,8 +4220,9 @@ }, "node_modules/pkg-up/node_modules/locate-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "license": "MIT", "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -3907,8 +4233,9 @@ }, "node_modules/pkg-up/node_modules/p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, @@ -3921,8 +4248,9 @@ }, "node_modules/pkg-up/node_modules/p-locate": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "license": "MIT", "dependencies": { "p-limit": "^2.0.0" }, @@ -3932,24 +4260,27 @@ }, "node_modules/pkg-up/node_modules/path-exists": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -3962,8 +4293,9 @@ }, "node_modules/pretty-bytes": { "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -3973,18 +4305,21 @@ }, "node_modules/proxy-from-env": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true }, "node_modules/psl": { "version": "1.9.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true }, "node_modules/pump": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, - "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -3992,19 +4327,23 @@ }, "node_modules/punycode": { "version": "1.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true }, "node_modules/qs": { "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.6" } }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -4019,34 +4358,37 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/rambda": { "version": "7.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", + "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", + "dev": true }, "node_modules/randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/range-parser": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/rc": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -4059,21 +4401,24 @@ }, "node_modules/rc/node_modules/ini": { "version": "1.3.8", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -4083,8 +4428,9 @@ }, "node_modules/rechoir": { "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, - "license": "MIT", "dependencies": { "resolve": "^1.9.0" }, @@ -4094,8 +4440,9 @@ }, "node_modules/regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -4105,8 +4452,9 @@ }, "node_modules/registry-auth-token": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, - "license": "MIT", "dependencies": { "rc": "^1.1.6", "safe-buffer": "^5.0.1" @@ -4114,8 +4462,9 @@ }, "node_modules/registry-url": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", "dev": true, - "license": "MIT", "dependencies": { "rc": "^1.0.1" }, @@ -4125,32 +4474,36 @@ }, "node_modules/request-progress": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", "dev": true, - "license": "MIT", "dependencies": { "throttleit": "^1.0.0" } }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "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, - "license": "MIT", "dependencies": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -4165,8 +4518,9 @@ }, "node_modules/resolve-dir": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, - "license": "MIT", "dependencies": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" @@ -4177,16 +4531,18 @@ }, "node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/resolve-pkg": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", + "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", "dev": true, - "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -4196,16 +4552,18 @@ }, "node_modules/resolve-pkg/node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/restore-cursor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, - "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -4216,8 +4574,9 @@ }, "node_modules/reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -4225,13 +4584,15 @@ }, "node_modules/rfdc": { "version": "1.3.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true }, "node_modules/rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -4244,8 +4605,9 @@ }, "node_modules/rollup": { "version": "3.2.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.5.tgz", + "integrity": "sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==", "dev": true, - "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, @@ -4259,6 +4621,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -4274,21 +4638,23 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/rxjs": { "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -4303,18 +4669,19 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safer-buffer": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/semver": { "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4327,16 +4694,18 @@ }, "node_modules/serialize-javascript": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/serve": { "version": "14.0.1", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", + "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", "dev": true, - "license": "MIT", "dependencies": { "@zeit/schemas": "2.21.0", "ajv": "8.11.0", @@ -4359,8 +4728,9 @@ }, "node_modules/serve-handler": { "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, - "license": "MIT", "dependencies": { "bytes": "3.0.0", "content-disposition": "0.5.2", @@ -4374,16 +4744,18 @@ }, "node_modules/serve-handler/node_modules/mime-db": { "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/serve-handler/node_modules/mime-types": { "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "~1.33.0" }, @@ -4393,8 +4765,9 @@ }, "node_modules/serve-handler/node_modules/minimatch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4404,8 +4777,9 @@ }, "node_modules/serve/node_modules/ajv": { "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -4419,8 +4793,9 @@ }, "node_modules/serve/node_modules/chalk": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", "dev": true, - "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -4430,13 +4805,15 @@ }, "node_modules/serve/node_modules/json-schema-traverse": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true }, "node_modules/shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4446,21 +4823,24 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/signal-exit": { "version": "3.0.7", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/slice-ansi": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" @@ -4474,8 +4854,9 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -4485,16 +4866,18 @@ }, "node_modules/source-map": { "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -4502,21 +4885,24 @@ }, "node_modules/source-map-support/node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/sprintf-js": { "version": "1.1.2", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true }, "node_modules/sshpk": { "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, - "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -4539,16 +4925,18 @@ }, "node_modules/string-argv": { "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.6.19" } }, "node_modules/string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -4560,16 +4948,18 @@ }, "node_modules/string-width/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4579,16 +4969,18 @@ }, "node_modules/strip-final-newline": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -4598,8 +4990,9 @@ }, "node_modules/supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4612,8 +5005,9 @@ }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4623,8 +5017,9 @@ }, "node_modules/terser": { "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -4640,28 +5035,33 @@ }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "node_modules/text-table": { "version": "0.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true }, "node_modules/throttleit": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", + "dev": true }, "node_modules/through": { "version": "2.3.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true }, "node_modules/tmp": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, - "license": "MIT", "dependencies": { "rimraf": "^3.0.0" }, @@ -4671,8 +5071,9 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -4682,8 +5083,9 @@ }, "node_modules/tough-cookie": { "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -4694,21 +5096,24 @@ }, "node_modules/tough-cookie/node_modules/punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/tslib": { "version": "2.4.1", - "dev": true, - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "dev": true }, "node_modules/tunnel-agent": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, - "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -4718,13 +5123,15 @@ }, "node_modules/tweetnacl": { "version": "0.14.5", - "dev": true, - "license": "Unlicense" + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, - "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -4734,16 +5141,18 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -4753,26 +5162,18 @@ }, "node_modules/unc-path-regex": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/underscore": { - "version": "1.13.6", - "dev": true, - "license": "MIT" - }, - "node_modules/underscore-deep-extend": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/underscore.string": { "version": "3.3.6", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", + "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", "dev": true, - "license": "MIT", "dependencies": { "sprintf-js": "^1.1.1", "util-deprecate": "^1.0.2" @@ -4783,24 +5184,27 @@ }, "node_modules/universalify": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10.0.0" } }, "node_modules/untildify": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/update-check": { "version": "1.5.4", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", + "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", "dev": true, - "license": "MIT", "dependencies": { "registry-auth-token": "3.3.2", "registry-url": "3.1.0" @@ -4808,37 +5212,42 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/uri-js/node_modules/punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/uuid": { "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/v8flags": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", "dev": true, - "license": "MIT", "dependencies": { "homedir-polyfill": "^1.0.1" }, @@ -4848,19 +5257,21 @@ }, "node_modules/vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/verror": { "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" ], - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -4869,8 +5280,9 @@ }, "node_modules/which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -4883,8 +5295,9 @@ }, "node_modules/widest-line": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, - "license": "MIT", "dependencies": { "string-width": "^5.0.1" }, @@ -4897,8 +5310,9 @@ }, "node_modules/widest-line/node_modules/ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "license": "MIT", "engines": { "node": ">=12" }, @@ -4908,13 +5322,15 @@ }, "node_modules/widest-line/node_modules/emoji-regex": { "version": "9.2.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true }, "node_modules/widest-line/node_modules/string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -4929,8 +5345,9 @@ }, "node_modules/widest-line/node_modules/strip-ansi": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -4943,21 +5360,24 @@ }, "node_modules/word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/workerpool": { "version": "6.2.1", - "dev": true, - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -4972,34 +5392,39 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yallist": { "version": "4.0.0", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/yaml": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true, - "license": "ISC", "engines": { "node": ">= 14" } }, "node_modules/yargs": { "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "license": "MIT", "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -5015,16 +5440,18 @@ }, "node_modules/yargs-parser": { "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yargs-unparser": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "license": "MIT", "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", @@ -5037,8 +5464,9 @@ }, "node_modules/yargs-unparser/node_modules/camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -5048,8 +5476,9 @@ }, "node_modules/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, - "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -5057,8 +5486,9 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -5070,11 +5500,15 @@ "dependencies": { "@colors/colors": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, "optional": true }, "@cypress/request": { "version": "2.88.10", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.10.tgz", + "integrity": "sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -5099,6 +5533,8 @@ }, "@cypress/xvfb": { "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, "requires": { "debug": "^3.1.0", @@ -5107,6 +5543,8 @@ "dependencies": { "debug": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -5116,6 +5554,8 @@ }, "@eslint/eslintrc": { "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", + "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5131,6 +5571,8 @@ }, "@humanwhocodes/config-array": { "version": "0.11.7", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.7.tgz", + "integrity": "sha512-kBbPWzN8oVMLb0hOUYXhmxggL/1cJE6ydvjDIGi9EnAGUyA7cLVKQg+d/Dsm+KZwx2czGHrCmMVLiyg8s5JPKw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -5140,14 +5582,20 @@ }, "@humanwhocodes/module-importer": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, "@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==", "dev": true }, "@jridgewell/gen-mapping": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", @@ -5157,14 +5605,20 @@ }, "@jridgewell/resolve-uri": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true }, "@jridgewell/set-array": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, "@jridgewell/source-map": { "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", @@ -5173,10 +5627,14 @@ }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "@jridgewell/trace-mapping": { "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", "dev": true, "requires": { "@jridgewell/resolve-uri": "3.1.0", @@ -5185,6 +5643,8 @@ }, "@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -5193,10 +5653,14 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -5205,6 +5669,8 @@ }, "@rollup/plugin-terser": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.1.0.tgz", + "integrity": "sha512-N2KK+qUfHX2hBzVzM41UWGLrEmcjVC37spC8R3c9mt3oEDFKh3N2e12/lLp9aVSt86veR0TQiCNQXrm8C6aiUQ==", "dev": true, "requires": { "terser": "^5.15.1" @@ -5212,22 +5678,32 @@ }, "@types/minimatch": { "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", "dev": true }, "@types/node": { "version": "14.18.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.33.tgz", + "integrity": "sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==", "dev": true }, "@types/sinonjs__fake-timers": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", "dev": true }, "@types/sizzle": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", "dev": true }, "@types/yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, "optional": true, "requires": { @@ -5236,14 +5712,20 @@ }, "@zeit/schemas": { "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.21.0.tgz", + "integrity": "sha512-/J4WBTpWtQ4itN1rb3ao8LfClmVcmz2pO6oYb7Qd4h7VSqUhIbJIvrykz9Ew1WMg6eFWsKdsMHc5uPbFxqlCpg==", "dev": true }, "abbrev": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, "accepts": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { "mime-types": "~2.1.34", @@ -5252,15 +5734,21 @@ }, "acorn": { "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", "dev": true }, "acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, "aggregate-error": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { "clean-stack": "^2.0.0", @@ -5269,6 +5757,8 @@ }, "ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -5279,6 +5769,8 @@ }, "ansi-align": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, "requires": { "string-width": "^4.1.0" @@ -5286,10 +5778,14 @@ }, "ansi-colors": { "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "requires": { "type-fest": "^0.21.3" @@ -5297,16 +5793,22 @@ "dependencies": { "type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true } } }, "ansi-regex": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -5314,6 +5816,8 @@ }, "anymatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -5322,38 +5826,56 @@ }, "arch": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true }, "arg": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", "dev": true }, "argparse": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "array-differ": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true }, "array-each": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true }, "array-slice": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, "array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, "arrify": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true }, "asn1": { "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "requires": { "safer-buffer": "~2.1.0" @@ -5361,46 +5883,68 @@ }, "assert-plus": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true }, "assertion-error": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, "astral-regex": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", "dev": true }, "asynckit": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "at-least-node": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true }, "aws-sign2": { "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true }, "aws4": { "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "dev": true }, "balanced-match": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, "bcrypt-pbkdf": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "requires": { "tweetnacl": "^0.14.3" @@ -5408,18 +5952,26 @@ }, "binary-extensions": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, "blob-util": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", "dev": true }, "bluebird": { "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true }, "boxen": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.0.tgz", + "integrity": "sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==", "dev": true, "requires": { "ansi-align": "^3.0.1", @@ -5434,22 +5986,32 @@ "dependencies": { "ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true }, "chalk": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.1.2.tgz", + "integrity": "sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==", "dev": true }, "emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { "eastasianwidth": "^0.2.0", @@ -5459,6 +6021,8 @@ }, "strip-ansi": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -5466,10 +6030,14 @@ }, "type-fest": { "version": "2.19.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", "dev": true }, "wrap-ansi": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", "dev": true, "requires": { "ansi-styles": "^6.1.0", @@ -5481,6 +6049,8 @@ }, "brace-expansion": { "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -5489,6 +6059,8 @@ }, "braces": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { "fill-range": "^7.0.1" @@ -5496,10 +6068,14 @@ }, "browser-stdout": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { "base64-js": "^1.3.1", @@ -5508,34 +6084,50 @@ }, "buffer-crc32": { "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true }, "buffer-from": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, "bytes": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", "dev": true }, "cachedir": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", "dev": true }, "callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.0.tgz", + "integrity": "sha512-JToIvOmz6nhGsUhAYScbo2d6Py5wojjNfoxoc2mEVLUdJ70gJK2gnd+ABY1Tc3sVMyK7QDPtN0T/XdlCQWITyQ==", "dev": true }, "caseless": { "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, "chai": { "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -5549,6 +6141,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -5557,6 +6151,8 @@ "dependencies": { "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -5566,6 +6162,8 @@ }, "chalk-template": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", + "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", "dev": true, "requires": { "chalk": "^4.1.2" @@ -5573,14 +6171,20 @@ }, "check-error": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true }, "check-more-types": { "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true }, "chokidar": { "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { "anymatch": "~3.1.2", @@ -5595,6 +6199,8 @@ "dependencies": { "glob-parent": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -5604,18 +6210,26 @@ }, "ci-info": { "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", + "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", "dev": true }, "clean-stack": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, "cli-boxes": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz", + "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==", "dev": true }, "cli-cursor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "requires": { "restore-cursor": "^3.1.0" @@ -5623,6 +6237,8 @@ }, "cli-table3": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", "dev": true, "requires": { "@colors/colors": "1.5.0", @@ -5631,6 +6247,8 @@ }, "cli-truncate": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, "requires": { "slice-ansi": "^5.0.0", @@ -5639,14 +6257,20 @@ "dependencies": { "ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { "eastasianwidth": "^0.2.0", @@ -5656,6 +6280,8 @@ }, "strip-ansi": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -5665,6 +6291,8 @@ }, "clipboardy": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-3.0.0.tgz", + "integrity": "sha512-Su+uU5sr1jkUy1sGRpLKjKrvEOVXgSgiSInwa/qeID6aJ07yh+5NWc3h2QfjHjBnfX4LhtFcuAWKUsJ3r+fjbg==", "dev": true, "requires": { "arch": "^2.2.0", @@ -5674,6 +6302,8 @@ "dependencies": { "execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "requires": { "cross-spawn": "^7.0.3", @@ -5689,16 +6319,22 @@ }, "get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, "human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true } } }, "cliui": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { "string-width": "^4.2.0", @@ -5708,6 +6344,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -5715,18 +6353,26 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "colorette": { "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, "colors": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", "dev": true }, "combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { "delayed-stream": "~1.0.0" @@ -5734,14 +6380,20 @@ }, "commander": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true }, "common-tags": { "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true }, "compressible": { "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { "mime-db": ">= 1.43.0 < 2" @@ -5749,6 +6401,8 @@ }, "compression": { "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", "dev": true, "requires": { "accepts": "~1.3.5", @@ -5762,6 +6416,8 @@ "dependencies": { "debug": { "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -5769,28 +6425,40 @@ }, "ms": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "safe-buffer": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true } } }, "concat-map": { "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "content-disposition": { "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha512-kRGRZw3bLlFISDBgwTSA1TMBFN6J6GWDeubmDE3AF+3+yXL8hTWv8r5rkLbqYXY4RjPk/EzHnClI3zQf1cFmHA==", "dev": true }, "core-util-is": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true }, "cross-spawn": { "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -5800,6 +6468,8 @@ }, "cypress": { "version": "10.11.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz", + "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -5848,6 +6518,8 @@ }, "dashdash": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -5855,14 +6527,20 @@ }, "dateformat": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", "dev": true }, "dayjs": { "version": "1.11.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", + "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==", "dev": true }, "debug": { "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -5870,10 +6548,14 @@ }, "decamelize": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, "deep-eql": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { "type-detect": "^4.0.0" @@ -5881,26 +6563,38 @@ }, "deep-extend": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, "detect-file": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true }, "diff": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "doctrine": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -5908,10 +6602,14 @@ }, "eastasianwidth": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, "ecc-jsbn": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "requires": { "jsbn": "~0.1.0", @@ -5920,10 +6618,14 @@ }, "emoji-regex": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" @@ -5931,6 +6633,8 @@ }, "enquirer": { "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { "ansi-colors": "^4.1.1" @@ -5938,14 +6642,20 @@ }, "escalade": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-string-regexp": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "eslint": { "version": "8.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.26.0.tgz", + "integrity": "sha512-kzJkpaw1Bfwheq4VXUezFriD1GxszX6dUekM7Z3aC2o4hju+tsR/XyTC3RcoSD7jmy9VkPU3+N6YjVU2e96Oyg==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", @@ -5991,6 +6701,8 @@ }, "eslint-plugin-mocha": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz", + "integrity": "sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw==", "dev": true, "requires": { "eslint-utils": "^3.0.0", @@ -5999,6 +6711,8 @@ }, "eslint-scope": { "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -6007,6 +6721,8 @@ }, "eslint-utils": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" @@ -6014,16 +6730,22 @@ "dependencies": { "eslint-visitor-keys": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true } } }, "eslint-visitor-keys": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "espree": { "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -6033,10 +6755,14 @@ }, "esprima": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -6044,6 +6770,8 @@ }, "esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -6051,18 +6779,26 @@ }, "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "eventemitter2": { "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true }, "execa": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -6078,6 +6814,8 @@ }, "executable": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "requires": { "pify": "^2.2.0" @@ -6085,10 +6823,14 @@ }, "exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, "expand-tilde": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, "requires": { "homedir-polyfill": "^1.0.1" @@ -6096,10 +6838,14 @@ }, "extend": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extract-zip": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "requires": { "@types/yauzl": "^2.9.1", @@ -6110,22 +6856,32 @@ }, "extsprintf": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true }, "fast-deep-equal": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "fast-levenshtein": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "fast-url-parser": { "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", "dev": true, "requires": { "punycode": "^1.3.2" @@ -6133,6 +6889,8 @@ }, "fastq": { "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -6140,6 +6898,8 @@ }, "fd-slicer": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "requires": { "pend": "~1.2.0" @@ -6147,6 +6907,8 @@ }, "figures": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -6154,12 +6916,16 @@ "dependencies": { "escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true } } }, "file-entry-cache": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" @@ -6167,6 +6933,8 @@ }, "fill-range": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -6174,6 +6942,8 @@ }, "find-up": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { "locate-path": "^6.0.0", @@ -6182,6 +6952,8 @@ }, "findup-sync": { "version": "0.3.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", "dev": true, "requires": { "glob": "~5.0.0" @@ -6189,6 +6961,8 @@ "dependencies": { "glob": { "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, "requires": { "inflight": "^1.0.4", @@ -6202,6 +6976,8 @@ }, "fined": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -6213,14 +6989,20 @@ }, "flagged-respawn": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", "dev": true }, "flat": { "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, "flat-cache": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { "flatted": "^3.1.0", @@ -6229,14 +7011,20 @@ }, "flatted": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "for-in": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true }, "for-own": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", "dev": true, "requires": { "for-in": "^1.0.1" @@ -6244,10 +7032,14 @@ }, "forever-agent": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true }, "form-data": { "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -6257,6 +7049,8 @@ }, "fs-extra": { "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { "at-least-node": "^1.0.0", @@ -6267,27 +7061,39 @@ }, "fs.realpath": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "fsevents": { "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, "function-bind": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-func-name": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true }, "get-stream": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { "pump": "^3.0.0" @@ -6295,10 +7101,14 @@ }, "getobject": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", + "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", "dev": true }, "getos": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, "requires": { "async": "^3.2.0" @@ -6306,6 +7116,8 @@ }, "getpass": { "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "requires": { "assert-plus": "^1.0.0" @@ -6313,6 +7125,8 @@ }, "glob": { "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -6325,6 +7139,8 @@ }, "glob-parent": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { "is-glob": "^4.0.3" @@ -6332,6 +7148,8 @@ }, "global-dirs": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { "ini": "2.0.0" @@ -6339,6 +7157,8 @@ }, "global-modules": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", "dev": true, "requires": { "global-prefix": "^1.0.1", @@ -6348,6 +7168,8 @@ }, "global-prefix": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -6359,10 +7181,14 @@ "dependencies": { "ini": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "which": { "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -6372,6 +7198,8 @@ }, "globals": { "version": "13.17.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", + "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -6379,14 +7207,20 @@ }, "graceful-fs": { "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "grapheme-splitter": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, "grunt": { "version": "1.5.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", + "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", "dev": true, "requires": { "dateformat": "~3.0.3", @@ -6408,6 +7242,8 @@ "dependencies": { "argparse": { "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -6415,10 +7251,14 @@ }, "eventemitter2": { "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", "dev": true }, "js-yaml": { "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -6427,6 +7267,8 @@ }, "minimatch": { "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -6434,12 +7276,16 @@ }, "sprintf-js": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true } } }, "grunt-cli": { "version": "1.4.3", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", + "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", "dev": true, "requires": { "grunt-known-options": "~2.0.0", @@ -6451,6 +7297,8 @@ "dependencies": { "nopt": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, "requires": { "abbrev": "1", @@ -6459,45 +7307,26 @@ } } }, - "grunt-contrib-clean": { - "version": "2.0.1", - "dev": true, - "requires": { - "async": "^3.2.3", - "rimraf": "^2.6.2" - }, - "dependencies": { - "rimraf": { - "version": "2.7.1", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } - } - }, "grunt-contrib-concat": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz", + "integrity": "sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw==", "dev": true, "requires": { "chalk": "^4.1.2", "source-map": "^0.5.3" } }, - "grunt-json-merge": { - "version": "0.2.2", - "dev": true, - "requires": { - "underscore": "^1.6.0", - "underscore-deep-extend": "0.0.3" - } - }, "grunt-known-options": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", + "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", "dev": true }, "grunt-legacy-log": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, "requires": { "colors": "~1.1.2", @@ -6508,6 +7337,8 @@ }, "grunt-legacy-log-utils": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, "requires": { "chalk": "~4.1.0", @@ -6516,6 +7347,8 @@ }, "grunt-legacy-util": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", "dev": true, "requires": { "async": "~3.2.0", @@ -6529,6 +7362,8 @@ }, "has": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { "function-bind": "^1.1.1" @@ -6536,14 +7371,20 @@ }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "he": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "homedir-polyfill": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, "requires": { "parse-passwd": "^1.0.0" @@ -6551,10 +7392,14 @@ }, "hooker": { "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", "dev": true }, "http-signature": { "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -6564,14 +7409,20 @@ }, "human-signals": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, "husky": { "version": "8.0.1", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.1.tgz", + "integrity": "sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==", "dev": true }, "iconv-lite": { "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -6579,14 +7430,20 @@ }, "ieee754": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, "ignore": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -6595,14 +7452,20 @@ }, "imurmurhash": { "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true }, "indent-string": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, "inflight": { "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -6611,18 +7474,26 @@ }, "inherits": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "ini": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true }, "interpret": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", "dev": true }, "is-absolute": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "requires": { "is-relative": "^1.0.0", @@ -6631,6 +7502,8 @@ }, "is-binary-path": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { "binary-extensions": "^2.0.0" @@ -6638,6 +7511,8 @@ }, "is-ci": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "requires": { "ci-info": "^3.2.0" @@ -6645,6 +7520,8 @@ }, "is-core-module": { "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "requires": { "has": "^1.0.3" @@ -6652,18 +7529,26 @@ }, "is-docker": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true }, "is-extglob": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true }, "is-glob": { "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -6671,6 +7556,8 @@ }, "is-installed-globally": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { "global-dirs": "^3.0.0", @@ -6679,18 +7566,26 @@ }, "is-number": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, "is-path-inside": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, "is-plain-obj": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, "is-plain-object": { "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -6698,10 +7593,14 @@ }, "is-port-reachable": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-port-reachable/-/is-port-reachable-4.0.0.tgz", + "integrity": "sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==", "dev": true }, "is-relative": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "requires": { "is-unc-path": "^1.0.0" @@ -6709,14 +7608,20 @@ }, "is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "is-typedarray": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, "is-unc-path": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "requires": { "unc-path-regex": "^0.1.2" @@ -6724,14 +7629,20 @@ }, "is-unicode-supported": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, "is-windows": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "is-wsl": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "requires": { "is-docker": "^2.0.0" @@ -6739,22 +7650,32 @@ }, "isexe": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, "isobject": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true }, "isstream": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, "js-sdsl": { "version": "4.1.5", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", + "integrity": "sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==", "dev": true }, "js-yaml": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -6762,26 +7683,38 @@ }, "jsbn": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true }, "json-schema": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true }, "json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "json-stringify-safe": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, "jsonfile": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { "graceful-fs": "^4.1.6", @@ -6790,6 +7723,8 @@ }, "jsprim": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "requires": { "assert-plus": "1.0.0", @@ -6800,14 +7735,20 @@ }, "kind-of": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "lazy-ass": { "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true }, "levn": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { "prelude-ls": "^1.2.1", @@ -6816,6 +7757,8 @@ }, "liftup": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", + "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", "dev": true, "requires": { "extend": "^3.0.2", @@ -6830,6 +7773,8 @@ "dependencies": { "findup-sync": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", + "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", "dev": true, "requires": { "detect-file": "^1.0.0", @@ -6842,10 +7787,14 @@ }, "lilconfig": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", + "integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==", "dev": true }, "lint-staged": { "version": "13.0.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-13.0.3.tgz", + "integrity": "sha512-9hmrwSCFroTSYLjflGI8Uk+GWAwMB4OlpU4bMJEAT5d/llQwtYKoim4bLOyLCuWFAhWEupE0vkIFqtw/WIsPug==", "dev": true, "requires": { "cli-truncate": "^3.1.0", @@ -6865,10 +7814,14 @@ "dependencies": { "commander": { "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", "dev": true }, "execa": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", + "integrity": "sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==", "dev": true, "requires": { "cross-spawn": "^7.0.3", @@ -6884,22 +7837,32 @@ }, "get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, "human-signals": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==", "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-stream": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true }, "listr2": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz", + "integrity": "sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==", "dev": true, "requires": { "cli-truncate": "^2.1.0", @@ -6914,6 +7877,8 @@ "dependencies": { "cli-truncate": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "requires": { "slice-ansi": "^3.0.0", @@ -6924,10 +7889,14 @@ }, "mimic-fn": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true }, "npm-run-path": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, "requires": { "path-key": "^4.0.0" @@ -6935,6 +7904,8 @@ }, "onetime": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "requires": { "mimic-fn": "^4.0.0" @@ -6942,10 +7913,14 @@ }, "path-key": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true }, "slice-ansi": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -6955,12 +7930,16 @@ }, "strip-final-newline": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true } } }, "listr2": { "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, "requires": { "cli-truncate": "^2.1.0", @@ -6975,6 +7954,8 @@ "dependencies": { "cli-truncate": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "requires": { "slice-ansi": "^3.0.0", @@ -6983,10 +7964,14 @@ }, "is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "slice-ansi": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -6998,6 +7983,8 @@ }, "load-grunt-tasks": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-5.1.0.tgz", + "integrity": "sha512-oNj0Jlka1TsfDe+9He0kcA1cRln+TMoTsEByW7ij6kyktNLxBKJtslCFEvFrLC2Dj0S19IWJh3fOCIjLby2Xrg==", "dev": true, "requires": { "arrify": "^2.0.1", @@ -7008,6 +7995,8 @@ }, "locate-path": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { "p-locate": "^5.0.0" @@ -7015,18 +8004,26 @@ }, "lodash": { "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.merge": { "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "lodash.once": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true }, "log-symbols": { "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -7035,6 +8032,8 @@ }, "log-update": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, "requires": { "ansi-escapes": "^4.3.0", @@ -7045,10 +8044,14 @@ "dependencies": { "is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "slice-ansi": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -7058,6 +8061,8 @@ }, "wrap-ansi": { "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -7069,6 +8074,8 @@ }, "loupe": { "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", "dev": true, "requires": { "get-func-name": "^2.0.0" @@ -7076,6 +8083,8 @@ }, "lru-cache": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { "yallist": "^4.0.0" @@ -7083,6 +8092,8 @@ }, "make-iterator": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, "requires": { "kind-of": "^6.0.2" @@ -7090,14 +8101,20 @@ }, "map-cache": { "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true }, "merge-stream": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, "micromatch": { "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { "braces": "^3.0.2", @@ -7106,10 +8123,14 @@ }, "mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { "mime-db": "1.52.0" @@ -7117,10 +8138,14 @@ }, "mimic-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7128,14 +8153,20 @@ }, "minimist": { "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true }, "mkdirp": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, "mocha": { "version": "10.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz", + "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==", "dev": true, "requires": { "ansi-colors": "4.1.1", @@ -7163,10 +8194,14 @@ "dependencies": { "ansi-colors": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "glob": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -7179,6 +8214,8 @@ "dependencies": { "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7188,6 +8225,8 @@ }, "minimatch": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -7195,6 +8234,8 @@ "dependencies": { "brace-expansion": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -7204,16 +8245,22 @@ }, "ms": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } }, "ms": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "multimatch": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", "dev": true, "requires": { "@types/minimatch": "^3.0.3", @@ -7225,18 +8272,26 @@ }, "nanoid": { "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, "natural-compare": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "nopt": { "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "requires": { "abbrev": "1" @@ -7244,10 +8299,14 @@ }, "normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "npm-run-path": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { "path-key": "^3.0.0" @@ -7255,10 +8314,14 @@ }, "object-inspect": { "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", "dev": true }, "object.defaults": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", "dev": true, "requires": { "array-each": "^1.0.1", @@ -7269,6 +8332,8 @@ }, "object.map": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", "dev": true, "requires": { "for-own": "^1.0.0", @@ -7277,6 +8342,8 @@ }, "object.pick": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -7284,10 +8351,14 @@ }, "on-headers": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", "dev": true }, "once": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -7295,6 +8366,8 @@ }, "onetime": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -7302,6 +8375,8 @@ }, "optionator": { "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { "deep-is": "^0.1.3", @@ -7314,14 +8389,20 @@ }, "os-homedir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true }, "os-tmpdir": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, "osenv": { "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { "os-homedir": "^1.0.0", @@ -7330,10 +8411,14 @@ }, "ospath": { "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", "dev": true }, "p-limit": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { "yocto-queue": "^0.1.0" @@ -7341,6 +8426,8 @@ }, "p-locate": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { "p-limit": "^3.0.2" @@ -7348,6 +8435,8 @@ }, "p-map": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "requires": { "aggregate-error": "^3.0.0" @@ -7355,10 +8444,14 @@ }, "p-try": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -7366,6 +8459,8 @@ }, "parse-filepath": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", "dev": true, "requires": { "is-absolute": "^1.0.0", @@ -7375,30 +8470,44 @@ }, "parse-passwd": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true }, "path-exists": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-is-inside": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", "dev": true }, "path-key": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "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 }, "path-root": { "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", "dev": true, "requires": { "path-root-regex": "^0.1.0" @@ -7406,38 +8515,56 @@ }, "path-root-regex": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true }, "path-to-regexp": { "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", "dev": true }, "pathval": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, "pend": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true }, "performance-now": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "picomatch": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pidtree": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true }, "pify": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true }, "pkg-up": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", + "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", "dev": true, "requires": { "find-up": "^3.0.0" @@ -7445,6 +8572,8 @@ "dependencies": { "find-up": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -7452,6 +8581,8 @@ }, "locate-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -7460,6 +8591,8 @@ }, "p-limit": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -7467,6 +8600,8 @@ }, "p-locate": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -7474,32 +8609,46 @@ }, "path-exists": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true } } }, "prelude-ls": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "prettier": { "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, "pretty-bytes": { "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true }, "proxy-from-env": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "dev": true }, "psl": { "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "pump": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -7508,22 +8657,32 @@ }, "punycode": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, "qs": { "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, "queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "rambda": { "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.3.0.tgz", + "integrity": "sha512-RFVofZYaG2TaVcxjnM0ejdVWf/59rFq1f57OGnjP3GT/bthzFw0GVr5rkP9PKbVlEuF/Y7bOVPLfiiYfxq/EWQ==", "dev": true }, "randombytes": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -7531,10 +8690,14 @@ }, "range-parser": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==", "dev": true }, "rc": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { "deep-extend": "^0.6.0", @@ -7545,16 +8708,22 @@ "dependencies": { "ini": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "strip-json-comments": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true } } }, "readdirp": { "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -7562,6 +8731,8 @@ }, "rechoir": { "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, "requires": { "resolve": "^1.9.0" @@ -7569,10 +8740,14 @@ }, "regexpp": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "registry-auth-token": { "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", "dev": true, "requires": { "rc": "^1.1.6", @@ -7581,6 +8756,8 @@ }, "registry-url": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==", "dev": true, "requires": { "rc": "^1.0.1" @@ -7588,6 +8765,8 @@ }, "request-progress": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", "dev": true, "requires": { "throttleit": "^1.0.0" @@ -7595,14 +8774,20 @@ }, "require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { "is-core-module": "^2.9.0", @@ -7612,6 +8797,8 @@ }, "resolve-dir": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, "requires": { "expand-tilde": "^2.0.0", @@ -7620,10 +8807,14 @@ }, "resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve-pkg": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-2.0.0.tgz", + "integrity": "sha512-+1lzwXehGCXSeryaISr6WujZzowloigEofRB+dj75y9RRa/obVcYgbHJd53tdYw8pvZj8GojXaaENws8Ktw/hQ==", "dev": true, "requires": { "resolve-from": "^5.0.0" @@ -7631,12 +8822,16 @@ "dependencies": { "resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true } } }, "restore-cursor": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "requires": { "onetime": "^5.1.0", @@ -7645,14 +8840,20 @@ }, "reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rfdc": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", "dev": true }, "rimraf": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -7660,6 +8861,8 @@ }, "rollup": { "version": "3.2.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.2.5.tgz", + "integrity": "sha512-/Ha7HhVVofduy+RKWOQJrxe4Qb3xyZo+chcpYiD8SoQa4AG7llhupUtyfKSSrdBM2mWJjhM8wZwmbY23NmlIYw==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -7667,6 +8870,8 @@ }, "run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -7674,6 +8879,8 @@ }, "rxjs": { "version": "7.5.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz", + "integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -7681,14 +8888,20 @@ }, "safe-buffer": { "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "semver": { "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -7696,6 +8909,8 @@ }, "serialize-javascript": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -7703,6 +8918,8 @@ }, "serve": { "version": "14.0.1", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.0.1.tgz", + "integrity": "sha512-tNGwxl27FwA8TbmMQqN0jTaSx8/trL532qZsJHX1VdiEIjjtMJHCs7AFS6OvtC7cTHOvmjXqt5yczejU6CV2Xg==", "dev": true, "requires": { "@zeit/schemas": "2.21.0", @@ -7720,6 +8937,8 @@ "dependencies": { "ajv": { "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -7730,16 +8949,22 @@ }, "chalk": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz", + "integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==", "dev": true }, "json-schema-traverse": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true } } }, "serve-handler": { "version": "6.1.3", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz", + "integrity": "sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w==", "dev": true, "requires": { "bytes": "3.0.0", @@ -7754,10 +8979,14 @@ "dependencies": { "mime-db": { "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true }, "mime-types": { "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { "mime-db": "~1.33.0" @@ -7765,6 +8994,8 @@ }, "minimatch": { "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7774,6 +9005,8 @@ }, "shebang-command": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { "shebang-regex": "^3.0.0" @@ -7781,14 +9014,20 @@ }, "shebang-regex": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "signal-exit": { "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "slice-ansi": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "requires": { "ansi-styles": "^6.0.0", @@ -7797,16 +9036,22 @@ "dependencies": { "ansi-styles": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true } } }, "source-map": { "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", "dev": true }, "source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -7815,16 +9060,22 @@ "dependencies": { "source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, "sprintf-js": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, "sshpk": { "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -7840,10 +9091,14 @@ }, "string-argv": { "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", "dev": true }, "string-width": { "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -7853,12 +9108,16 @@ "dependencies": { "is-fullwidth-code-point": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true } } }, "strip-ansi": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { "ansi-regex": "^5.0.1" @@ -7866,14 +9125,20 @@ }, "strip-final-newline": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, "strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -7881,10 +9146,14 @@ }, "supports-preserve-symlinks-flag": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, "terser": { "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", @@ -7895,24 +9164,34 @@ "dependencies": { "commander": { "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true } } }, "text-table": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "throttleit": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", "dev": true }, "through": { "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, "tmp": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, "requires": { "rimraf": "^3.0.0" @@ -7920,6 +9199,8 @@ }, "to-regex-range": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { "is-number": "^7.0.0" @@ -7927,6 +9208,8 @@ }, "tough-cookie": { "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { "psl": "^1.1.28", @@ -7935,16 +9218,22 @@ "dependencies": { "punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } }, "tslib": { "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", "dev": true }, "tunnel-agent": { "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -7952,10 +9241,14 @@ }, "tweetnacl": { "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "type-check": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { "prelude-ls": "^1.2.1" @@ -7963,26 +9256,26 @@ }, "type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "unc-path-regex": { "version": "0.1.2", - "dev": true - }, - "underscore": { - "version": "1.13.6", - "dev": true - }, - "underscore-deep-extend": { - "version": "0.0.3", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", "dev": true }, "underscore.string": { "version": "3.3.6", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", + "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", "dev": true, "requires": { "sprintf-js": "^1.1.1", @@ -7991,14 +9284,20 @@ }, "universalify": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, "untildify": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true }, "update-check": { "version": "1.5.4", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.4.tgz", + "integrity": "sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==", "dev": true, "requires": { "registry-auth-token": "3.3.2", @@ -8007,6 +9306,8 @@ }, "uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -8014,20 +9315,28 @@ "dependencies": { "punycode": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } }, "util-deprecate": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "uuid": { "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "v8flags": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", "dev": true, "requires": { "homedir-polyfill": "^1.0.1" @@ -8035,10 +9344,14 @@ }, "vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, "verror": { "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -8048,6 +9361,8 @@ }, "which": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -8055,6 +9370,8 @@ }, "widest-line": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz", + "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==", "dev": true, "requires": { "string-width": "^5.0.1" @@ -8062,14 +9379,20 @@ "dependencies": { "ansi-regex": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true }, "emoji-regex": { "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "string-width": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "requires": { "eastasianwidth": "^0.2.0", @@ -8079,6 +9402,8 @@ }, "strip-ansi": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", "dev": true, "requires": { "ansi-regex": "^6.0.1" @@ -8088,14 +9413,20 @@ }, "word-wrap": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, "workerpool": { "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, "wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -8105,22 +9436,32 @@ }, "wrappy": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yaml": { "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.1.3.tgz", + "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true }, "yargs": { "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -8134,10 +9475,14 @@ }, "yargs-parser": { "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true }, "yargs-unparser": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "requires": { "camelcase": "^6.0.0", @@ -8148,12 +9493,16 @@ "dependencies": { "camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true } } }, "yauzl": { "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "requires": { "buffer-crc32": "~0.2.3", @@ -8162,6 +9511,8 @@ }, "yocto-queue": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true } } diff --git a/package.json b/package.json index dd85484..e4b4554 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,7 @@ "eslint-plugin-mocha": "10.1.0", "grunt": "1.5.3", "grunt-cli": "1.4.3", - "grunt-contrib-clean": "2.0.1", "grunt-contrib-concat": "2.1.0", - "grunt-json-merge": "0.2.2", "husky": "8.0.1", "lint-staged": "13.0.3", "load-grunt-tasks": "5.1.0", diff --git a/src/system.js b/src/system.js index 5c2c75e..192d31b 100644 --- a/src/system.js +++ b/src/system.js @@ -222,62 +222,30 @@ export default { _id: '135c71078810af2', _name: '_Channel', _core: true, - send: { - params: [ - { - name: 'message', - type: 'message', - }, - ], - }, + send: { params: [{ name: 'message', type: 'message' }] }, $systemInstalled: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, $systemResolved: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, $systemUninstalled: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, $systemStarted: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, $systemStopped: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, }, @@ -287,14 +255,8 @@ export default { _core: true, on: { params: [ - { - name: 'state', - type: 'string', - }, - { - name: 'action', - type: 'function', - }, + { name: 'state', type: 'string' }, + { name: 'action', type: 'function' }, { name: 'useCoreAPI', type: 'any', @@ -311,76 +273,22 @@ export default { }, off: { params: [ - { - name: 'state', - type: 'string', - mandatory: false, - }, - { - name: 'behaviorId', - type: 'string', - mandatory: false, - }, - ], - }, - require: { - params: [ - { - name: 'id', - type: 'string', - }, - ], - }, - destroy: { - params: [], - }, - init: { - params: [ - { - name: 'document', - type: 'object', - }, - ], - }, - error: { - params: [ - { - name: 'e', - type: 'errorInfo', - }, + { name: 'state', type: 'string', mandatory: false }, + { name: 'behaviorId', type: 'string', mandatory: false }, ], }, + require: { params: [{ name: 'id', type: 'string' }] }, + destroy: { params: [] }, + init: { params: [{ name: 'document', type: 'object' }] }, + error: { params: [{ name: 'e', type: 'errorInfo' }] }, }, '18a51169d7112d4': { _name: '_Database', _core: true, - collections: { - result: 'object', - }, - insert: { - params: [ - { - name: 'event', - type: 'dbInsertEvent', - }, - ], - }, - update: { - params: [ - { - name: 'event', - type: 'dbUpdateEvent', - }, - ], - }, - remove: { - params: [ - { - name: 'event', - type: 'dbRemoveEvent', - }, - ], - }, + collections: { result: 'object' }, + insert: { params: [{ name: 'event', type: 'dbInsertEvent' }] }, + update: { params: [{ name: 'event', type: 'dbUpdateEvent' }] }, + remove: { params: [{ name: 'event', type: 'dbRemoveEvent' }] }, _id: '18a51169d7112d4', }, '16b9d1ac2216ffe': { @@ -393,38 +301,10 @@ export default { mandatory: false, default: 'warn', }, - debug: { - params: [ - { - name: 'message', - type: 'any', - }, - ], - }, - info: { - params: [ - { - name: 'message', - type: 'any', - }, - ], - }, - warn: { - params: [ - { - name: 'message', - type: 'any', - }, - ], - }, - error: { - params: [ - { - name: 'message', - type: 'any', - }, - ], - }, + debug: { params: [{ name: 'message', type: 'any' }] }, + info: { params: [{ name: 'message', type: 'any' }] }, + warn: { params: [{ name: 'message', type: 'any' }] }, + error: { params: [{ name: 'message', type: 'any' }] }, }, '1d9b6139411aa91': { _name: '_Message', @@ -454,12 +334,7 @@ export default { _core: true, schema: { params: [ - { - name: 'name', - type: 'any', - default: '', - mandatory: false, - }, + { name: 'name', type: 'any', default: '', mandatory: false }, { name: 'schema', type: 'object', @@ -471,12 +346,7 @@ export default { }, model: { params: [ - { - name: 'name', - type: 'any', - default: '', - mandatory: false, - }, + { name: 'name', type: 'any', default: '', mandatory: false }, { name: 'model', type: 'object', @@ -488,12 +358,7 @@ export default { }, type: { params: [ - { - name: 'name', - type: 'any', - default: '', - mandatory: false, - }, + { name: 'name', type: 'any', default: '', mandatory: false }, { name: 'type', type: 'object', @@ -503,9 +368,7 @@ export default { ], result: 'any', }, - create: { - params: [], - }, + create: { params: [] }, _id: '1628c13c22152e6', }, '100b91ed2211b15': { @@ -513,12 +376,7 @@ export default { _name: '_OSGi', install: { params: [ - { - name: 'url', - type: 'any', - mandatory: true, - default: '', - }, + { name: 'url', type: 'any', mandatory: true, default: '' }, { name: 'async', type: 'boolean', @@ -530,41 +388,22 @@ export default { }, uninstall: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, start: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, stop: { params: [ - { - name: 'id', - type: 'string', - mandatory: true, - default: '', - }, + { name: 'id', type: 'string', mandatory: true, default: '' }, ], }, - status: { - result: 'object', - }, + status: { result: 'object' }, _core: true, - bundle: { - result: 'string', - }, + bundle: { result: 'string' }, }, '14c7c105b31a160': { _id: '14c7c105b31a160', @@ -577,23 +416,11 @@ export default { default: '6.0.0-beta.4', }, system: { - params: [ - { - name: 'params', - type: 'any', - mandatory: false, - }, - ], + params: [{ name: 'params', type: 'any', mandatory: false }], result: 'object', }, message: { - params: [ - { - name: 'msg', - type: 'message', - mandatory: true, - }, - ], + params: [{ name: 'msg', type: 'message', mandatory: true }], }, ready: {}, }, @@ -679,15 +506,9 @@ export default { _id: 'bd8d7e02-cd1f-4e4e-857f-077d6425cc1a', _name: '_History', _description: '', - back: { - result: 'number', - }, - forward: { - result: 'number', - }, - dump: { - result: 'string', - }, + back: { result: 'number' }, + forward: { result: 'number' }, + dump: { result: 'string' }, _core: true, from: { params: [ @@ -712,25 +533,12 @@ export default { result: 'object', }, load: { - params: [ - { - name: 'dump', - type: 'any', - mandatory: true, - default: '', - }, - ], + params: [{ name: 'dump', type: 'any', mandatory: true, default: '' }], result: 'boolean', }, - start: { - result: 'any', - }, - stop: { - result: 'any', - }, - clear: { - result: 'any', - }, + start: { result: 'any' }, + stop: { result: 'any' }, + clear: { result: 'any' }, }, }, behaviors: { @@ -1040,16 +848,8 @@ export default { name: 'dbInsertEvent', type: 'object', schema: { - collection: { - type: 'string', - mandatory: true, - default: '', - }, - document: { - type: 'object', - mandatory: true, - default: {}, - }, + collection: { type: 'string', mandatory: true, default: '' }, + document: { type: 'object', mandatory: true, default: {} }, }, }, dbRemoveEvent: { @@ -1058,16 +858,8 @@ export default { type: 'object', core: true, schema: { - collection: { - type: 'string', - mandatory: true, - default: '', - }, - id: { - type: 'string', - mandatory: true, - default: '', - }, + collection: { type: 'string', mandatory: true, default: '' }, + id: { type: 'string', mandatory: true, default: '' }, }, }, dbUpdateEvent: { @@ -1076,26 +868,10 @@ export default { name: 'dbUpdateEvent', type: 'object', schema: { - collection: { - type: 'string', - mandatory: true, - default: '', - }, - id: { - type: 'string', - mandatory: true, - default: '', - }, - field: { - type: 'string', - mandatory: true, - default: '', - }, - value: { - type: 'any', - mandatory: true, - default: null, - }, + collection: { type: 'string', mandatory: true, default: '' }, + id: { type: 'string', mandatory: true, default: '' }, + field: { type: 'string', mandatory: true, default: '' }, + value: { type: 'any', mandatory: true, default: null }, }, }, collection: { @@ -1103,34 +879,13 @@ export default { name: 'collection', type: 'object', schema: { - type: { - type: ['string'], - mandatory: true, - }, - readOnly: { - type: 'boolean', - mandatory: true, - }, - mandatory: { - type: 'boolean', - mandatory: true, - }, - default: { - type: 'array', - mandatory: true, - }, - description: { - type: 'string', - mandatory: false, - }, - label: { - type: 'string', - mandatory: false, - }, - kind: { - type: 'string', - mandatory: false, - }, + type: { type: ['string'], mandatory: true }, + readOnly: { type: 'boolean', mandatory: true }, + mandatory: { type: 'boolean', mandatory: true }, + default: { type: 'array', mandatory: true }, + description: { type: 'string', mandatory: false }, + label: { type: 'string', mandatory: false }, + kind: { type: 'string', mandatory: false }, }, core: true, }, @@ -1139,14 +894,8 @@ export default { name: 'event', type: 'object', schema: { - params: { - type: ['parameter'], - mandatory: false, - }, - description: { - type: 'string', - mandatory: false, - }, + params: { type: ['parameter'], mandatory: false }, + description: { type: 'string', mandatory: false }, }, core: true, }, @@ -1167,34 +916,13 @@ export default { name: 'link', type: 'object', schema: { - type: { - type: 'string', - mandatory: true, - }, - readOnly: { - type: 'boolean', - mandatory: true, - }, - mandatory: { - type: 'boolean', - mandatory: true, - }, - default: { - type: '{type}', - mandatory: true, - }, - description: { - type: 'string', - mandatory: false, - }, - label: { - type: 'string', - mandatory: false, - }, - kind: { - type: 'string', - mandatory: false, - }, + type: { type: 'string', mandatory: true }, + readOnly: { type: 'boolean', mandatory: true }, + mandatory: { type: 'boolean', mandatory: true }, + default: { type: '{type}', mandatory: true }, + description: { type: 'string', mandatory: false }, + label: { type: 'string', mandatory: false }, + kind: { type: 'string', mandatory: false }, }, core: true, }, @@ -1210,18 +938,9 @@ export default { name: 'message', type: 'object', schema: { - event: { - type: 'string', - mandatory: true, - }, - from: { - type: 'string', - mandatory: false, - }, - data: { - type: 'array', - mandatory: true, - }, + event: { type: 'string', mandatory: true }, + from: { type: 'string', mandatory: false }, + data: { type: 'array', mandatory: true }, }, core: true, }, @@ -1230,18 +949,9 @@ export default { name: 'method', type: 'object', schema: { - result: { - type: 'any', - mandatory: false, - }, - params: { - type: ['parameter'], - mandatory: false, - }, - description: { - type: 'string', - mandatory: false, - }, + result: { type: 'any', mandatory: false }, + params: { type: ['parameter'], mandatory: false }, + description: { type: 'string', mandatory: false }, }, core: true, }, @@ -1265,26 +975,11 @@ export default { name: 'parameter', type: 'object', schema: { - description: { - type: 'string', - mandatory: false, - }, - name: { - type: 'string', - mandatory: true, - }, - type: { - type: 'any', - mandatory: true, - }, - mandatory: { - type: 'boolean', - mandatory: false, - }, - default: { - type: '{type}', - mandatory: false, - }, + description: { type: 'string', mandatory: false }, + name: { type: 'string', mandatory: true }, + type: { type: 'any', mandatory: true }, + mandatory: { type: 'boolean', mandatory: false }, + default: { type: '{type}', mandatory: false }, }, core: true, }, @@ -1293,30 +988,12 @@ export default { name: 'property', type: 'object', schema: { - type: { - type: 'string', - mandatory: true, - }, - readOnly: { - type: 'boolean', - mandatory: true, - }, - mandatory: { - type: 'boolean', - mandatory: true, - }, - default: { - type: '{type}', - mandatory: true, - }, - description: { - type: 'string', - mandatory: false, - }, - label: { - type: 'string', - mandatory: false, - }, + type: { type: 'string', mandatory: true }, + readOnly: { type: 'boolean', mandatory: true }, + mandatory: { type: 'boolean', mandatory: true }, + default: { type: '{type}', mandatory: true }, + description: { type: 'string', mandatory: false }, + label: { type: 'string', mandatory: false }, }, core: true, }, @@ -1331,51 +1008,19 @@ export default { name: 'errorInfo', type: 'object', schema: { - message: { - type: 'string', - mandatory: true, - }, - stack: { - type: 'object', - mandatory: true, - }, + message: { type: 'string', mandatory: true }, + stack: { type: 'object', mandatory: true }, }, core: true, }, }, components: { - _Channel: { - channel: { - _id: 'channel', - }, - }, - _Database: { - db: { - _id: 'db', - }, - }, - _Logger: { - logger: { - _id: 'logger', - level: 'warn', - }, - }, - _Metamodel: { - metamodel: { - _id: 'metamodel', - }, - }, - _Runtime: { - runtime: { - _id: 'runtime', - version: '6.0.0-beta.4', - }, - }, - _History: { - history: { - _id: 'history', - }, - }, + _Channel: { channel: { _id: 'channel' } }, + _Database: { db: { _id: 'db' } }, + _Logger: { logger: { _id: 'logger', level: 'warn' } }, + _Metamodel: { metamodel: { _id: 'metamodel' } }, + _Runtime: { runtime: { _id: 'runtime', version: '6.0.0-beta.4' } }, + _History: { history: { _id: 'history' } }, }, _id: 'e89c617b6b15d24', }, diff --git a/tasks/clean.json b/tasks/clean.json deleted file mode 100644 index d7887cb..0000000 --- a/tasks/clean.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "build": ["build"] -} diff --git a/tasks/concat.json b/tasks/concat.json index cf965a2..bb69884 100644 --- a/tasks/concat.json +++ b/tasks/concat.json @@ -3,7 +3,7 @@ "files": { "src/system.js": [ "src/banners/systemmodule-header.txt", - "build/system-runtime.json", + "src/system/system-runtime.json", "src/banners/systemmodule-footer.txt" ] } diff --git a/tasks/json_merge.json b/tasks/json_merge.json deleted file mode 100644 index 7bd3aae..0000000 --- a/tasks/json_merge.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "system": { - "src": ["addons/*.json", "src/system/system-runtime.json"], - "dest": "build/system-runtime.json" - } -} From 4ac56d1ae045bd03f210ac3fdd0085b69f4baeb1 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 17:00:08 +0100 Subject: [PATCH 09/12] chore: update .npmignore --- .npmignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 2675b9e..b8e7a7a 100644 --- a/.npmignore +++ b/.npmignore @@ -15,8 +15,9 @@ CODE_OF_CONDUCT.md CONTRIBUTING.md cypress.config.js -Gruntfile.js +Gruntfile.cjs package-lock.json +rollup.config.iife rollup.config.js *.log .DS_Store \ No newline at end of file From 1d27a54ebf496f9993c6137638f06762a512a8e4 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 18:49:12 +0100 Subject: [PATCH 10/12] chore: clean code --- Gruntfile.cjs | 4 ++-- dist/system-runtime.min.js | 20 -------------------- package.json | 2 +- rollup.config.iife.js | 31 ------------------------------- tasks/concat.json | 6 +----- 5 files changed, 4 insertions(+), 59 deletions(-) delete mode 100644 dist/system-runtime.min.js delete mode 100644 rollup.config.iife.js diff --git a/Gruntfile.cjs b/Gruntfile.cjs index 16d281e..daa1a28 100644 --- a/Gruntfile.cjs +++ b/Gruntfile.cjs @@ -31,6 +31,6 @@ module.exports = (grunt) => { // create src/system.js file grunt.registerTask('system', ['concat:system']) - // add licenses - grunt.registerTask('licenses', ['concat:licenses']) + // add license + grunt.registerTask('license', ['concat:license']) } diff --git a/dist/system-runtime.min.js b/dist/system-runtime.min.js deleted file mode 100644 index b796470..0000000 --- a/dist/system-runtime.min.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * System Runtime - * - * https://designfirst.io/systemruntime/ - * - * Copyright 2022 Erwan Carriou - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var runtime=function(){"use strict";var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=R(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o Date: Tue, 1 Nov 2022 19:11:55 +0100 Subject: [PATCH 11/12] chore: update extensions --- extensions/mode-admin-server.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/mode-admin-server.json b/extensions/mode-admin-server.json index 2369120..1b9e7ba 100755 --- a/extensions/mode-admin-server.json +++ b/extensions/mode-admin-server.json @@ -1 +1 @@ -{"name":"mode-admin-server","master":false,"version":"1.0.0","description":"","schemas":{"1723516a30132ac":{"_name":"_Database","_inherit":["_Component"],"_core":true,"insert":"event","update":"event","remove":"event","_id":"1723516a30132ac"},"10374180581a41f":{"_id":"10374180581a41f","_name":"_Admin","_inherit":["_Component"],"_core":true},"104ad1f48518376":{"_id":"104ad1f48518376","_name":"_Channel","_core":true,"$editorUpdateSystem":"event","$editorUpdateSchema":"event","$editorUpdateSchemaId":"event","$editorUpdateSchemaName":"event","$editorUpdateModel":"event","$editorUpdateModelId":"event","$editorUpdateType":"event","$editorDeleteType":"event","$editorUpdateBehavior":"event","$editorDeleteBehavior":"event","$editorUpdateComponent":"event","$editorUpdateComponentId":"event","$editorDeleteComponent":"event","$appLogDebug":"event","$appLogInfo":"event","$appLogWarn":"event","$appLogError":"event","$appLoadSystem":"event","$designerSync":"event","$designerCreateBehavior":"event","$designerCreateComponent":"event","$designerCreateType":"event","$designerCreateSchema":"event","$designerCreateModel":"event","$designerDeleteSchema":"event","$designerDeleteModel":"event","$designerDeleteType":"event","$designerDeleteBehavior":"event","$designerDeleteComponent":"event","$designerUpdateComponent":"event","$designerUpdateModel":"event","$designerUpdateBehavior":"event","$runtimeCreateComponent":"event","$runtimeDeleteComponent":"event","$runtimeUpdateComponent":"event","send":"event"}},"models":{"18a51169d7112d4":{"_name":"_Database","_core":true,"insert":{"params":[{"name":"event","type":"dbInsertEvent"}]},"update":{"params":[{"name":"event","type":"dbUpdateEvent"}]},"remove":{"params":[{"name":"event","type":"dbRemoveEvent"}]},"_id":"18a51169d7112d4"},"138a81fa1f16435":{"_id":"138a81fa1f16435","_name":"_Admin","_inherit":["_Component"],"_core":true},"135c71078810af2":{"_id":"135c71078810af2","_name":"_Channel","_inherit":["_Component"],"_core":true,"$editorUpdateSchemaName":{"params":[{"name":"name","type":"string"},{"name":"id","type":"string"}]},"$designerSync":{"params":[{"name":"req","type":"object"}]},"$appLoadSystem":{"params":[{"name":"system","type":"object"}]},"$designerCreateBehavior":{"params":[{"name":"behavior","type":"object"}]},"$editorUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$designerUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$editorDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponentId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"},{"name":"collection","type":"string"}]},"$designerUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerCreateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorUpdateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchemaId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteSchema":{"params":[{"name":"id","type":"string"}]},"$designerCreateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$designerUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModelId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteModel":{"params":[{"name":"id","type":"string"}]},"$editorUpdateSystem":{"params":[{"name":"id","type":"string"},{"name":"system","type":"object"}]},"$appLogDebug":{"params":[{"name":"message","type":"string"}]},"$appLogInfo":{"params":[{"name":"message","type":"string"}]},"$appLogWarn":{"params":[{"name":"message","type":"string"}]},"$appLogError":{"params":[{"name":"message","type":"string"}]},"$runtimeCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$runtimeDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$runtimeUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"field","type":"string"},{"name":"value","type":"any"}]},"send":{"params":[{"name":"message","type":"message"}]}}},"behaviors":{"h1b3891699319be4":{"_id":"h1b3891699319be4","component":"channel","state":"$designerCreateSchema","action":"function $designerCreateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w161ae196d51f585":{"_id":"w161ae196d51f585","component":"channel","state":"$editorUpdateSchema","action":"function $editorUpdateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x12449136a811be2":{"_id":"x12449136a811be2","component":"channel","state":"$designerDeleteSchema","action":"function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"h103b01d9591bbb4":{"_id":"h103b01d9591bbb4","component":"channel","state":"$designerCreateModel","action":"function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"r12c4e1d6cf1cf0e":{"_id":"r12c4e1d6cf1cf0e","component":"channel","state":"$editorUpdateModel","action":"function $editorUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x1eb4c1d03b1ee34":{"_id":"x1eb4c1d03b1ee34","component":"channel","state":"$designerUpdateModel","action":"function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w1c68e1c7aa19326":{"_id":"w1c68e1c7aa19326","component":"channel","state":"$designerDeleteModel","action":"function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"x1f6bc11b3816de0":{"_id":"x1f6bc11b3816de0","component":"channel","state":"$designerCreateType","action":"function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"m1ff4f11d19164c0":{"_id":"m1ff4f11d19164c0","component":"channel","state":"$editorUpdateType","action":"function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"u1e8bd17bdc15d6a":{"_id":"u1e8bd17bdc15d6a","component":"channel","state":"$editorDeleteType","action":"function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"k18a311f76f1ff2a":{"_id":"k18a311f76f1ff2a","component":"channel","state":"$designerDeleteType","action":"function $designerDeleteType() { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"i1fe2e1f8fe1f3b7":{"_id":"i1fe2e1f8fe1f3b7","component":"channel","state":"$designerCreateComponent","action":"function $designerCreateComponent(collection, component) { \n $db.collections[collection].insert(component);\t\n}","useCoreAPI":true,"core":true},"e1cc381f58818dd4":{"_id":"e1cc381f58818dd4","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"r18f80173fe19997":{"_id":"r18f80173fe19997","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"o1ed5a1768c181b2":{"_id":"o1ed5a1768c181b2","component":"channel","state":"$editorDeleteComponent","action":"function $editorDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"t18fe213b0718b38":{"_id":"t18fe213b0718b38","component":"channel","state":"$designerDeleteComponent","action":"function $designerDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"p1524e1d2c414a17":{"_id":"p1524e1d2c414a17","component":"channel","state":"$designerCreateBehavior","action":"function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n}","useCoreAPI":true,"core":true},"m154451abb8103f1":{"_id":"m154451abb8103f1","component":"channel","state":"$editorUpdateBehavior","action":"function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require(behavior.component).start();\n }\n }\n}","useCoreAPI":true,"core":true},"q131b819d531053f":{"_id":"q131b819d531053f","component":"channel","state":"$editorDeleteBehavior","action":"function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h1214316cb61ea28":{"_id":"h1214316cb61ea28","component":"channel","state":"$designerDeleteBehavior","action":"function $designerDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h109eb1b4ed148fd":{"_id":"h109eb1b4ed148fd","component":"channel","state":"$designerSync","action":"function $designerSync(req) { \n req.end(this.require('runtime').bundle());\t\n}","useCoreAPI":true,"core":true},"w1a9961205712671":{"_id":"w1a9961205712671","component":"db","state":"insert","action":"function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}","useCoreAPI":false,"core":true},"j122701697c19935":{"_id":"j122701697c19935","component":"db","state":"remove","action":"function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}","useCoreAPI":false,"core":true},"t118f61f6d0127e4":{"_id":"t118f61f6d0127e4","component":"db","state":"update","action":"function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}","useCoreAPI":false,"core":true},"e10ba11978d122c5":{"_id":"e10ba11978d122c5","component":"admin","state":"init","action":"async function init(conf) {\n let http = await import('http'),\n qs = await import('querystring'),\n runtime = await import ('system-runtime');\n\n // Create server\n http.createServer(function (req, res) {\n let message = null;\n\n // POST\n if (req.method == 'POST') {\n let body = '';\n req.on('data', function (data) {\n body = body + data;\n if (body.length > 1e6) {\n req.connection.destroy();\n }\n });\n req.on('end', function () {\n let post = qs.parse(body),\n message = {};\n\n function _postToMessage(url, post) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n }\n }\n\n message.event = event;\n message.data = JSON.parse(decodeURIComponent(Object.keys(post)[0]));\n\n return message;\n }\n\n message = _postToMessage(req.url, post);\n runtime.message(message);\n });\n }\n\n // GET\n if (req.method == 'GET') {\n function _getToMessage(url, res) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n if (url.indexOf('favicon.ico') !== -1) {\n message = null;\n } else {\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n } else {\n data.push(params[i]);\n }\n }\n data.push(res);\n\n message.event = event;\n message.data = data;\n\n if (event === '') {\n message = null;\n }\n }\n return message;\n }\n\n res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });\n message = _getToMessage(req.url, res);\n\n if (message) {\n runtime.message(message);\n } else {\n res.end('');\n }\n }\n }).listen(8888, '127.0.0.1');\n\n console.log('System Runtime Admin is started on http://127.0.0.1:8888');\n}","useCoreAPI":true,"core":true}},"types":{},"components":{"_Admin":{"admin":{"_id":"admin","_core":true}},"_Channel":{"channel":{"_id":"channel"}},"_Database":{"db":{"_id":"db"}}},"_id":"q1e1a01bbb514f49"} \ No newline at end of file +{"name":"mode-admin-server","master":false,"version":"1.0.0","description":"","schemas":{"1723516a30132ac":{"_name":"_Database","_inherit":["_Component"],"_core":true,"insert":"event","update":"event","remove":"event","_id":"1723516a30132ac"},"10374180581a41f":{"_id":"10374180581a41f","_name":"_Admin","_inherit":["_Component"],"_core":true},"104ad1f48518376":{"_id":"104ad1f48518376","_name":"_Channel","_core":true,"$editorUpdateSystem":"event","$editorUpdateSchema":"event","$editorUpdateSchemaId":"event","$editorUpdateSchemaName":"event","$editorUpdateModel":"event","$editorUpdateModelId":"event","$editorUpdateType":"event","$editorDeleteType":"event","$editorUpdateBehavior":"event","$editorDeleteBehavior":"event","$editorUpdateComponent":"event","$editorUpdateComponentId":"event","$editorDeleteComponent":"event","$appLogDebug":"event","$appLogInfo":"event","$appLogWarn":"event","$appLogError":"event","$appLoadSystem":"event","$designerSync":"event","$designerCreateBehavior":"event","$designerCreateComponent":"event","$designerCreateType":"event","$designerCreateSchema":"event","$designerCreateModel":"event","$designerDeleteSchema":"event","$designerDeleteModel":"event","$designerDeleteType":"event","$designerDeleteBehavior":"event","$designerDeleteComponent":"event","$designerUpdateComponent":"event","$designerUpdateModel":"event","$designerUpdateBehavior":"event","$runtimeCreateComponent":"event","$runtimeDeleteComponent":"event","$runtimeUpdateComponent":"event","send":"event"}},"models":{"18a51169d7112d4":{"_name":"_Database","_core":true,"insert":{"params":[{"name":"event","type":"dbInsertEvent"}]},"update":{"params":[{"name":"event","type":"dbUpdateEvent"}]},"remove":{"params":[{"name":"event","type":"dbRemoveEvent"}]},"_id":"18a51169d7112d4"},"138a81fa1f16435":{"_id":"138a81fa1f16435","_name":"_Admin","_inherit":["_Component"],"_core":true},"135c71078810af2":{"_id":"135c71078810af2","_name":"_Channel","_inherit":["_Component"],"_core":true,"$editorUpdateSchemaName":{"params":[{"name":"name","type":"string"},{"name":"id","type":"string"}]},"$designerSync":{"params":[{"name":"req","type":"object"}]},"$appLoadSystem":{"params":[{"name":"system","type":"object"}]},"$designerCreateBehavior":{"params":[{"name":"behavior","type":"object"}]},"$editorUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$designerUpdateBehavior":{"params":[{"name":"id","type":"string"},{"name":"behavior","type":"object"}]},"$editorDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerDeleteBehavior":{"params":[{"name":"id","type":"string"}]},"$designerCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorUpdateComponentId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"},{"name":"collection","type":"string"}]},"$designerUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$editorDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$designerCreateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorUpdateType":{"params":[{"name":"id","type":"string"},{"name":"type","type":"object"}]},"$editorDeleteType":{"params":[{"name":"id","type":"string"}]},"$designerCreateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchema":{"params":[{"name":"id","type":"string"},{"name":"schema","type":"object"}]},"$editorUpdateSchemaId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteSchema":{"params":[{"name":"id","type":"string"}]},"$designerCreateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$designerUpdateModel":{"params":[{"name":"id","type":"string"},{"name":"model","type":"object"}]},"$editorUpdateModelId":{"params":[{"name":"oldId","type":"string"},{"name":"newId","type":"string"}]},"$designerDeleteModel":{"params":[{"name":"id","type":"string"}]},"$editorUpdateSystem":{"params":[{"name":"id","type":"string"},{"name":"system","type":"object"}]},"$appLogDebug":{"params":[{"name":"message","type":"string"}]},"$appLogInfo":{"params":[{"name":"message","type":"string"}]},"$appLogWarn":{"params":[{"name":"message","type":"string"}]},"$appLogError":{"params":[{"name":"message","type":"string"}]},"$runtimeCreateComponent":{"params":[{"name":"collection","type":"string"},{"name":"component","type":"object"}]},"$runtimeDeleteComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"}]},"$runtimeUpdateComponent":{"params":[{"name":"id","type":"string"},{"name":"collection","type":"string"},{"name":"field","type":"string"},{"name":"value","type":"any"}]},"send":{"params":[{"name":"message","type":"message"}]}}},"behaviors":{"h1b3891699319be4":{"_id":"h1b3891699319be4","component":"channel","state":"$designerCreateSchema","action":"function $designerCreateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w161ae196d51f585":{"_id":"w161ae196d51f585","component":"channel","state":"$editorUpdateSchema","action":"function $editorUpdateSchema(id, schema) { \n this.require('logger').level('warn');\n this.require('metamodel').schema(schema);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x12449136a811be2":{"_id":"x12449136a811be2","component":"channel","state":"$designerDeleteSchema","action":"function $designerDeleteSchema(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Schema.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Schema.remove({ '_id': id });\n \n search = $db.collections._Model.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._Model.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n }\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"h103b01d9591bbb4":{"_id":"h103b01d9591bbb4","component":"channel","state":"$designerCreateModel","action":"function $designerCreateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"r12c4e1d6cf1cf0e":{"_id":"r12c4e1d6cf1cf0e","component":"channel","state":"$editorUpdateModel","action":"function $editorUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"x1eb4c1d03b1ee34":{"_id":"x1eb4c1d03b1ee34","component":"channel","state":"$designerUpdateModel","action":"function $designerUpdateModel(id, model) { \n this.require('logger').level('warn');\n this.require('metamodel').model(model);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"w1c68e1c7aa19326":{"_id":"w1c68e1c7aa19326","component":"channel","state":"$designerDeleteModel","action":"function $designerDeleteModel(id) { \n this.require('logger').level('warn');\n let search = $db.collections._Model.find({ '_id': id }),\n modelName = '',\n modelId = '';\n \n if (search.length) {\n modelName = search[0]._name;\n $db.collections._Model.remove({ '_id': id });\n $component.removeFromMemory(modelName);\n }\n \n search = $db.collections._GeneratedModel.find({ '_name': modelName });\n if (search.length) {\n modelId = search[0]._id;\n $db.collections._GeneratedModel.remove({ '_id': modelId });\n $component.removeFromMemory(modelName);\n }\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"x1f6bc11b3816de0":{"_id":"x1f6bc11b3816de0","component":"channel","state":"$designerCreateType","action":"function $designerCreateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"m1ff4f11d19164c0":{"_id":"m1ff4f11d19164c0","component":"channel","state":"$editorUpdateType","action":"function $editorUpdateType(id, type) { \n this.require('logger').level('warn');\n this.require('metamodel').type(type);\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":false,"core":true},"u1e8bd17bdc15d6a":{"_id":"u1e8bd17bdc15d6a","component":"channel","state":"$editorDeleteType","action":"function $editorDeleteType(id) { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"k18a311f76f1ff2a":{"_id":"k18a311f76f1ff2a","component":"channel","state":"$designerDeleteType","action":"function $designerDeleteType() { \n this.require('logger').level('warn');\n $db.collections._Type.remove({ 'name': id });\n this.require('metamodel').create();\n this.require('logger').level('debug');\t\n}","useCoreAPI":true,"core":true},"i1fe2e1f8fe1f3b7":{"_id":"i1fe2e1f8fe1f3b7","component":"channel","state":"$designerCreateComponent","action":"function $designerCreateComponent(collection, component) { \n $db.collections[collection].insert(component);\t\n}","useCoreAPI":true,"core":true},"e1cc381f58818dd4":{"_id":"e1cc381f58818dd4","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"r18f80173fe19997":{"_id":"r18f80173fe19997","component":"channel","state":"$editorUpdateComponent","action":"function $editorUpdateComponent(id, collection, component) { \n $db.collections[collection].update({ '_id': id }, component, { 'upsert': true });\t\n}","useCoreAPI":true,"core":true},"o1ed5a1768c181b2":{"_id":"o1ed5a1768c181b2","component":"channel","state":"$editorDeleteComponent","action":"function $editorDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"t18fe213b0718b38":{"_id":"t18fe213b0718b38","component":"channel","state":"$designerDeleteComponent","action":"function $designerDeleteComponent(id, collection) { \n $db.collections[collection].remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"p1524e1d2c414a17":{"_id":"p1524e1d2c414a17","component":"channel","state":"$designerCreateBehavior","action":"function $designerCreateBehavior(behavior) { \n $db.collections._Behavior.insert(behavior);\t\n}","useCoreAPI":true,"core":true},"m154451abb8103f1":{"_id":"m154451abb8103f1","component":"channel","state":"$editorUpdateBehavior","action":"function $editorUpdateBehavior(id, behavior) { \n if (this.require(id)) {\n this.require(id).action(behavior.action);\n if (behavior.state === 'start') {\n this.require(behavior.component).start();\n }\n }\n}","useCoreAPI":true,"core":true},"q131b819d531053f":{"_id":"q131b819d531053f","component":"channel","state":"$editorDeleteBehavior","action":"function $editorDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h1214316cb61ea28":{"_id":"h1214316cb61ea28","component":"channel","state":"$designerDeleteBehavior","action":"function $designerDeleteBehavior(id) { \n $db.collections._Behavior.remove({ '_id': id });\t\n}","useCoreAPI":true,"core":true},"h109eb1b4ed148fd":{"_id":"h109eb1b4ed148fd","component":"channel","state":"$designerSync","action":"function $designerSync(req) { \n req.end(this.require('runtime').bundle());\t\n}","useCoreAPI":true,"core":true},"w1a9961205712671":{"_id":"w1a9961205712671","component":"db","state":"insert","action":"function insert(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeCreateComponent(event.collection, event.document);\n }\t\n}","useCoreAPI":false,"core":true},"j122701697c19935":{"_id":"j122701697c19935","component":"db","state":"remove","action":"function remove(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeDeleteComponent(event.id, event.collection);\n }\t\n}","useCoreAPI":false,"core":true},"t118f61f6d0127e4":{"_id":"t118f61f6d0127e4","component":"db","state":"update","action":"function update(event) { \n if (event.collection.indexOf('_') !== 0) {\n this.require('channel').$runtimeUpdateComponent(event.id, event.collection, event.field, event.value);\n }\t\n}","useCoreAPI":false,"core":true},"e10ba11978d122c5":{"_id":"e10ba11978d122c5","component":"admin","state":"init","action":"async function init(conf) {\n let http = await import('http'),\n qs = await import('querystring'),\n module = await import ('system-runtime');\n \n const runtime = module.default;\n\n // Create server\n http.createServer(function (req, res) {\n let message = null;\n\n // POST\n if (req.method == 'POST') {\n let body = '';\n req.on('data', function (data) {\n body = body + data;\n if (body.length > 1e6) {\n req.connection.destroy();\n }\n });\n req.on('end', function () {\n let post = qs.parse(body),\n message = {};\n\n function _postToMessage(url, post) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n }\n }\n\n message.event = event;\n message.data = JSON.parse(decodeURIComponent(Object.keys(post)[0]));\n\n return message;\n }\n\n message = _postToMessage(req.url, post);\n runtime.message(message);\n });\n }\n\n // GET\n if (req.method == 'GET') {\n function _getToMessage(url, res) {\n let message = {\n 'from': '',\n 'event': '',\n 'data': []\n },\n event = '',\n data = [],\n params = [],\n i = 0,\n length = 0;\n\n if (url.indexOf('favicon.ico') !== -1) {\n message = null;\n } else {\n params = url.replace('/', '').split('/');\n length = params.length;\n for (i = 0; i < length; i++) {\n if (i === 0) {\n event = params[0];\n } else {\n data.push(params[i]);\n }\n }\n data.push(res);\n\n message.event = event;\n message.data = data;\n\n if (event === '') {\n message = null;\n }\n }\n return message;\n }\n\n res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' });\n message = _getToMessage(req.url, res);\n\n if (message) {\n runtime.message(message);\n } else {\n res.end('');\n }\n }\n }).listen(8888, '127.0.0.1');\n\n console.log('System Runtime Admin is started on http://127.0.0.1:8888');\n}","useCoreAPI":true,"core":true}},"types":{},"components":{"_Admin":{"admin":{"_id":"admin","_core":true}},"_Channel":{"channel":{"_id":"channel"}},"_Database":{"db":{"_id":"db"}}},"_id":"q1e1a01bbb514f49"} \ No newline at end of file From c7cd7cd6983e506819ab9de3e056a8e16dc85a51 Mon Sep 17 00:00:00 2001 From: Erwan Carriou Date: Tue, 1 Nov 2022 20:12:29 +0100 Subject: [PATCH 12/12] chore: bump 6.0.0-beta.5 --- README.md | 10 ++++++++-- dist/system-runtime.js | 2 +- dist/system-runtime.js.map | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/banners/systemmodule-header.txt | 2 +- src/system.js | 8 ++++---- src/system/system-runtime.json | 6 +++--- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index d743b74..c9bdd80 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,9 @@ Just add a link tag in your HTML to install and start your bundle: ```html + + + ``` #### Install the bundle in Node.js @@ -80,11 +83,14 @@ Just add a link tag in your HTML to install and start your bundle: Just call _install_ API to install and start your bundle: ```js -// require System Runtime +// import System Runtime import runtime from 'system-runtime' +// import the system +import system from './system.json' assert { type: 'json' } + // install your bundle -runtime.install('system.json') +runtime.install(system) ``` ## How System runtime helps you to create your system ? diff --git a/dist/system-runtime.js b/dist/system-runtime.js index d68802f..b67f57d 100644 --- a/dist/system-runtime.js +++ b/dist/system-runtime.js @@ -17,5 +17,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -var e={ID:"_id",NAME:"_name",DESCRIPTION:"_description",INHERIT:"_inherit",CLASS:"_class",CORE:"_core",INTERNAL_NAMES:["_id","_name","_inherit","_description","_class","_core"],PROPERTY_TYPE:"property",COLLECTION_TYPE:"collection",LINK_TYPE:"link",METHOD_TYPE:"method",EVENT_TYPE:"event",INTERNAL_TYPES:["property","collection","link","method","event"],DEFAULT_TYPES:["boolean","string","number","object","function","array","date","any"],SCHEMA_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1,default:["_Component"]},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},MODEL_DEFINITION:{_id:{type:"string",mandatory:!0},_name:{type:"string",mandatory:!0},_inherit:{type:["string"],mandatory:!1},_class:{type:"boolean",mandatory:!1},_core:{type:"boolean",mandatory:!1},_description:{type:"string",mandatory:!1}},TYPE_DEFINITION:{_id:{type:"string",mandatory:!0},name:{type:"string",mandatory:!0},type:{type:"string",mandatory:!0},schema:{type:"object",mandatory:!1},value:{type:["any"],mandatory:!1},core:{type:"boolean",mandatory:!1},description:{type:"string",mandatory:!1}}};let t=null,n={currentLevel:"warn",level:function(e){return e&&(this.currentLevel=e),this.currentLevel},debug:function(e){"debug"===this.currentLevel&&console.log("runtime: "+e)},info:function(e){"info"!==this.currentLevel&&"debug"!==this.currentLevel||console.info("runtime: "+e)},warn:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel||console.warn("runtime: "+e)},error:function(e){"info"!==this.currentLevel&&"warn"!==this.currentLevel&&"debug"!==this.currentLevel&&"error"!==this.currentLevel||console.error("runtime: "+e)}};function a(){let a="",r=[],o=null;return J.getModel("_Logger")?(r=Ee.collections._Logger.find(),r.length?(a=r[0][e.ID],fe.get(a)?(t=fe.get(a),o=t):o=n):o=n):o=n,o}var r={level:function(e){},unknownProperty:function(t,n){let r="";r=n[e.NAME]?"unknown property '"+t+"' for the definition of '"+n[e.NAME]+"'":"unknown property '"+t+"' for a model",a().warn(r)},invalidPropertyType:function(e,t,n){let r=n&&n.constructor?n.constructor.name:typeof n;a().warn("invalid value for property '"+e+"': expected type '"+t+"' instead of type '"+r+"'")},invalidEnumValue:function(e,t){a().warn("'"+e+"' is an invalid value for the type enum '"+t+"'")},invalidClassName:function(e,t,n){a().warn("invalid component '"+e+"' for a collection: expected a component of class '"+t+"' instead of '"+n+"'")},missingProperty:function(e){a().warn("property '"+e+"' is missing")},missingImplementation:function(e){a().warn("schema '"+e+"' is missing")},invalidTypeImp:function(e,t){a().error("the property '"+e+"' of "+t+" model is invalid")},missingPropertyImp:function(e,t){a().warn("missing property '"+e+"' in the model '"+t+"'")},unknownPropertyImp:function(e,t){a().error("the model '"+t+"' has an unknown property '"+e+"'")},invalidTypeDefinition:function(e){a().warn("the type '"+e+"' is not valid")},invalidPropertyName:function(e,t,n,r,o){let i="",s="";"Function"!==t&&(i=" ("+t+" class)"),"string"==typeof o?(s=r&&r.constructor?r.constructor.name:typeof r,a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' instead of type '"+s+"'")):(s=o&&o.constructor?o.constructor.name:typeof o,a().warn("invalid value for property '"+n+"' on component '"+i+": expected type 'string' instead of type '"+s+"'"))},readOnlyProperty:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("can not set read-only property '"+n+"' on component '"+e+"'"+r)},invalidDocumentOnDbInsert:function(e,t){a().warn("invalid document '"+JSON.stringify(e).replace(/,/g,", ")+"' ("+t+" collection)")},invalidPropertyTypeOnDbUpdate:function(e,t,n,r,o){a().warn("invalid type for the property '"+n+"' of the document '"+t+"' ("+e+" collection) with the value '"+JSON.stringify(r)+"': expected type '"+o+"'")},unknownPropertyOnDbUpdate:function(e,t,n){a().warn("unknown property '"+e+"' for document '"+n+"' ("+t+" collection)")},unknownMethod:function(e,t){a().warn("try to call an unknown action '"+t+"' for the class '"+e+"'")},invalidCollectionName:function(e){a().warn("invalid name for the collection '"+e+"': there is no schema '"+e+"'")},invalidResultType:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid type for the result of action '"+n+"' on component '"+e+"'"+i+": expected type '"+r+"' instead of type '"+o+"'")},unknownComponent:function(e,t){a().warn("unkown class name '"+e+"' for component '"+t+"'")},invalidParamNumber:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when calling the action '"+n+"' on component '"+e+"'"+r)},invalidParamType:function(e,t,n,r){let o="";"Function"!==t&&(o=" ("+t+" class)"),void 0!==r?a().warn("invalid type for the parameter '"+r+"' when calling the action '"+n+"' on component '"+e+"'"+o):a().warn("invalid type for a parameter when calling the action '"+n+"' on component '"+e+"'"+o)},behaviorNotUnique:function(e,t){a().warn("try to add more than one action for the state '"+t+"' on class '"+e+"'")},invalidStateOn:function(e,t){a().warn("try to add an action to an unkwown state '"+t+"' on class '"+e+"'")},invalidStateOff:function(e,t){a().warn("try to remove an action from an unkwown state '"+t+"' on class '"+e+"'")},masterSystemNotFound:function(){a().warn("can not export the database because no system was defined")},invalidType:function(e,t,n){let r=e&&t.constructor?t.constructor.name:typeof t;a().warn("invalid value for property '"+e+"': expected type '"+n+"' instead of type '"+r+"'")},invalidConfiguration:function(e,t){a().warn("invalid type for '"+JSON.stringify(e)+"': expected '"+t+"'")},unknownType:function(e){a().warn("unknown type for value '"+JSON.stringify(e)+"'")},unknownPath:function(e,t){a().warn("the path '"+e+"' has an unkown subpath '"+t+"'")},canNotYetValidate:function(e,t){a().debug("can not yet validate if the document '"+e+"' is compliant with "+t+" model")},invalidChannelEvent:function(e,t,n){a().warn("invalid type for the message '"+JSON.stringify(e)+"': expected type '"+n+"' for event '"+t+"'")},invalidParamNumberMethodOn:function(e,t,n){let r="";"Function"!==t&&(r=" ("+t+" class)"),a().warn("invalid number of parameters when adding an action for the state '"+n+"' on component '"+e+"'"+r)},updateUuid:function(e,t,n){n?a().warn("try to update a component of id '"+e+"' with the new id '"+t+"' that is already used"):a().warn("try to update a component of id '"+e+"' with the new id '"+t+"'")},invalidUseOfComponent:function(e){a().warn("try to change the state of the destroyed component '"+e+"'")},invalidSchema:function(e){a().warn("the schema '"+e+"' is not valid, it has been removed from the metamodel")},invalidModel:function(e){a().warn("the model '"+e+"' is not valid, it has been removed from the metamodel")},invalidParameters:function(e,t){let n=t&&t._id?t._id:"";a().warn("the parameters for creating '"+n+"' component ("+e+" model) are not compliant with the model")},destroyedComponentCall:function(e,t){a().warn("trying to get the property '"+e+"' on the destroyed component '"+t+"'")},invalidConctructorParameters:function(e,t){a().warn("the constructor parameter '"+JSON.stringify(e).replace(/,/g,", ")+"' for creating a component of class '"+t+"' is not an object")},unknownModel:function(e){a().warn("the model '"+e+"' does not exist")},missingSchema:function(e){a().warn("the schema '"+e+"' is missing")},cyclicDependency:function(e){e?a().error("a cyclic inheritance dependency with the schema '"+e+"’ has been found, please check the '_inherit' property of this schema"):a().error("a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas")},invalidEnumType:function(e,t,n){let r="";void 0!==n&&n!==typeof e?(r=e&&e.constructor?e.constructor.name:typeof e,a().warn("invalid type for the type '"+t+"': expected type '"+n+"' instead of type '"+r+"'")):a().warn("invalid type for the type '"+t+"'")},loadSchema:function(e){a().debug("load schema '"+e+"'")},loadModel:function(e){a().debug("load model '"+e+"'")},loadType:function(e){a().debug("load type '"+e+"'")},generatingSchema:function(e){a().debug("generating "+e+" schema ...")},checkModel:function(e){a().debug("analyzing "+e+" model...")},createClass:function(e){a().debug(e+" class has been created")},initDb:function(){a().debug("initializing data store...")},actionInvokeError:function(e,t,n,r){"Function"!==n?a().error("error when calling the action '"+e+"' on component '"+t+"' ("+n+" class): "+r):a().error("error when calling the action '"+e+"' on component '"+t+"': "+r)},invalidSchemaPropertyName:function(e,t){a().warn("invalid name '"+t+"' for schema '"+e+"': a property name can not begin with '_'")},invalidSchemaProperty:function(e,t){a().warn("invalid property '"+t+"' for schema '"+e+"': only 'property', 'link', 'collection', 'method' and 'event' are allowed")},invalidPropertyFormat:function(e){a().warn("invalid format for a definition of a property: '"+e+"' is not an object")},invalidState:function(e,t){a().warn("invalid state '"+t+"' for the model '"+e+"'")},unknownContext:function(e,t){a().warn("invoke the action '"+t+"' on the class '"+e+"' without a valid context")},historyDocumentInserted:function(e,t,n){a().debug("Created component of id '"+e+"' ('"+t+" collection) with document '"+n+"'")},historyDocumentRemoved:function(e,t){a().debug("Destroyed component of id '"+e+"' ("+t+" collection)")},historyDocumentUpdated:function(e,t,n,r){a().debug("Updated field '"+n+"' of component of id '"+e+"' with value '"+r+"' ("+t+" collection)")},invalidCollectionItem:function(e,t,n,r,o){let i="";"Function"!==t&&(i=" ("+t+" class)"),a().warn("invalid value for property '"+n+"' on component '"+e+"'"+i+": expected type '"+o+"' for all items of the collection '"+JSON.stringify(r)+"'")}};let o=null;var i={isRuntime:function(){let e=!1;return Ee.collections._Runtime&&Ee.collections._Runtime.find().length&&(e=!0),e},getRuntime:function(){let t="",n=Ee.collections._Runtime.find();return!o&&n[0]&&(t=n[0][e.ID],o=fe.get(t)),o},isOnNode:function(){let e=!1;return"undefined"==typeof window&&"undefined"!=typeof global&&(e=!0),e},generateId:function(){return function(){let e="abcdef";return e.charAt(Math.floor(Math.random()*e.length))}()+"xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}};let s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}};function l(t){let n=!0;return-1===e.INTERNAL_NAMES.indexOf(t)&&(n=!1),n}function c(){let t="",n="",a="",o={},i=null,c="",d=null,u=null,m=null,y={},f={},p=[],h=0,g=0,b=0,_=0,v=[];for(a in s.generatedSchemas){for(t in o=s.generatedSchemas[a],y={_name:o[e.NAME]},void 0!==o[e.CORE]&&(y[e.CORE]=o[e.CORE]),Array.isArray(o[e.INHERIT])&&(y[e.INHERIT]=o[e.INHERIT]),void 0!==o[e.CLASS]&&(y[e.CLASS]=o[e.CLASS]),void 0!==o[e.DESCRIPTION]&&(y[e.DESCRIPTION]=o[e.DESCRIPTION]),o)l(t)||0!==t.indexOf("_")||r.invalidSchemaPropertyName(o[e.NAME],t);for(t in o)switch(!0){case"property"===o[t]:y[t]={type:"any",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"link"===o[t]:y[t]={type:"_Component",readOnly:!1,mandatory:!1,default:"",description:t,label:t};break;case"method"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],result:"any",description:t};break;case"event"===o[t]:y[t]={params:[{name:"param1",type:"any",mandatory:!1,default:null},{name:"param2",type:"any",mandatory:!1,default:null},{name:"param3",type:"any",mandatory:!1,default:null}],description:t};break;case"collection"===o[t]:y[t]={type:["_Component"],readOnly:!1,mandatory:!1,default:[],description:t,label:t};break;default:l(t)||r.invalidSchemaProperty(o[e.NAME],t)}s.generatedModels[y[e.NAME]]=y}for(c in s.generatedModels)y=s.generatedModels[c],n=y[e.NAME],u=s.models[n],u&&(f=S(u,y),s.generatedModels[n]=f);for(v=function(){let e=[],t={},n=[],a="",r=0;for(a in s.inheritanceTree)r=s.inheritanceTree[a].length,void 0===t[r]&&(t[r]=[]),t[r].push(a);return n=Object.keys(t).sort(),n.forEach((function(n){t[n].forEach((function(t){e.push(t)}))})),e}(),_=v.length,g=0;g<_;g++)if(c=v[g],y=s.generatedModels[c],y){for(p=R(c),p.reverse(),h=p.length,b=0;b0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o0&&(n=!1);return n}function i(e){let t=0,n=0,r=[];for(n=e.length,t=0;t"===e:break;case"string"==typeof t&&"boolean"===t:a=n?{name:e,type:"boolean",mandatory:!1,default:!1}:{type:"boolean",readOnly:!1,mandatory:!1,default:!1};break;case"string"==typeof t&&"string"===t:a=n?{name:e,type:"string",mandatory:!1,default:""}:{type:"string",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t&&"number"===t:a=n?{name:e,type:"number",mandatory:!1,default:0}:{type:"number",readOnly:!1,mandatory:!1,default:0};break;case"string"==typeof t&&"object"===t:a=n?{name:e,type:"object",mandatory:!1,default:{}}:{type:"object",readOnly:!1,mandatory:!1,default:{}};break;case"string"==typeof t&&"array"===t:a=n?{name:e,type:"array",mandatory:!1,default:[]}:{type:"array",readOnly:!1,mandatory:!1,default:[]};break;case"string"==typeof t&&"date"===t:a=n?{name:e,type:"date",mandatory:!1,default:"1970-01-01T00:00:00.000Z"}:{type:"date",readOnly:!1,mandatory:!1,default:"1970-01-01T00:00:00.000Z"};break;case"string"==typeof t&&"any"===t:a=n?{name:e,type:"any",mandatory:!1,default:null}:{type:"any",readOnly:!1,mandatory:!1,default:""};break;case"string"==typeof t:i={},r=Ee.collections._Type.find({name:t}),r.length&&r[0].value&&(i=r[0].value[0]),o=Ee.collections._Schema.find({_name:t}),o.length&&(i=""),a=n?{name:e,type:t,mandatory:!1,default:i}:{type:t,readOnly:!1,mandatory:!1,default:i};break;case Array.isArray(t)&&"boolean"===t[0]:a=n?{name:e,type:["boolean"],mandatory:!1,default:[]}:{type:["boolean"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"string"===t[0]:a=n?{name:e,type:["string"],mandatory:!1,default:""}:{type:["string"],readOnly:!1,mandatory:!1,default:""};break;case Array.isArray(t)&&"number"===t[0]:a=n?{name:e,type:["number"],mandatory:!1,default:[]}:{type:["number"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"object"===t[0]:a=n?{name:e,type:["object"],mandatory:!1,default:[]}:{type:["object"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"date"===t[0]:a=n?{name:e,type:["date"],mandatory:!1,default:[]}:{type:["date"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t)&&"any"===t[0]:a=n?{name:e,type:["any"],mandatory:!1,default:[]}:{type:["any"],readOnly:!1,mandatory:!1,default:[]};break;case Array.isArray(t):a=n?{name:e,type:t,mandatory:!1,default:[]}:{type:t,readOnly:!1,mandatory:!1,default:[]}}return a}function N(e){let t="",n="",a={};for(t in e=JSON.parse(JSON.stringify(e)))if(e.hasOwnProperty(t)&&0!==t.indexOf("_"))switch(!0){case"string"==typeof e[t]||Array.isArray(e[t]):e[t]=I(t,e[t],!1);break;case"object"==typeof e[t]&&void 0===e[t]["=>"]:e[t]=S(e[t],I(t,e[t].type||"any"));break;case"object"==typeof e[t]&&void 0!==e[t]["=>"]:for(n in a={params:[],result:"any"},e[t])"string"==typeof e[t][n]&&("=>"===n?a.result=e[t][n]:a.params.push(I(n,e[t][n],!0))),"object"==typeof e[t][n]&&a.params.push(S(e[t][n]),I(n,e[t][n].type||"any"));e[t]=a}return e}function k(){s={inheritance:{},inheritanceTree:{},schemas:{},generatedSchemas:{},models:{},generatedModels:{},states:{},type:{}}}function w(e,t,n){let a=!0;switch(!0){case h(t):a=f(e,t),a||(s.type[t]?r.invalidEnumType(e,t,s.type[t].type):r.invalidEnumType(e,t)),a&&(a=function(e,t){let n=s.type[t],a=!0;return Array.isArray(n.value)&&-1===n.value.indexOf(e)&&(a=!1),!1===a&&r.invalidEnumValue(e,t),a}(e,t));break;case j(t):n||(null!==e&&"string"!=typeof e?a=D(b(e),t):null!==e&&(a=!1));break;default:a=function(e,t,n){let a=!0,r="",o=0,i=0;switch(r=g(t),r){case"string":a=v(e,t);break;case"array":if(Array.isArray(e))for(i=e.length,o=0;o0:case v(e,"string")&&""!==e:}else D(s.constructor.name,m)?l&&o&&(t[i]=s.id()):(a=!1,r.invalidType(i,e,m));return a}function I(e,t){let n=!0,s=null,l="";switch(y=g(t),y){case"any":break;case"string":if(h(y))n=x(e,t,a,o);else if("array"===t){if("array"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}}else if("date"===t){if(s=new Date(e),n=!isNaN(s.getDate()),!n){r.invalidPropertyType(i,t,e);break}}else if(g(e)!==t&&"any"!==g(e)){r.invalidPropertyType(i,t,e),n=!1;break}break;case"array":if(Array.isArray(e)){for(f=e.length,l=t[0],_=0;_0&&void 0!==s.generatedModels[e]),t}var J={schema:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?"string"==typeof t?((n={})[e.NAME]=t,s=t):s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=n[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),void 0===n[e.INHERIT]&&(n[e.INHERIT]=["_Component"]),n[e.INHERIT]=function(e){let t=[],n={};return e.forEach((function(e){let a=e.trim();void 0===n[a]&&(n[a]=a,t.push(a))})),t}(n[e.INHERIT]),x(n,e.SCHEMA_DEFINITION,!1)?(c=Ee.collections._Schema.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Schema.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Schema.insert(n),a=o[0])):r.invalidSchema(n[e.NAME]),a},model:function(t,n){let a=null,o=[],s="",l={},c=[];return void 0===n||0===Object.keys(n).length?s=(n=JSON.parse(JSON.stringify(t)))[e.NAME]:((n=JSON.parse(JSON.stringify(n)))[e.NAME]=t,s=(n=N(n))[e.NAME]),void 0===n[e.ID]&&(n[e.ID]=i.generateId()),x(n,e.MODEL_DEFINITION,!1)?(c=Ee.collections._Model.find({_name:s}),c.length?(l=S(n,c[0]),Ee.collections._Model.update({_name:s},l),a=c[0][e.ID]):(o=Ee.collections._Model.insert(n),a=o[0])):r.invalidModel(n[e.NAME]),a},type:function(t,n){let a=null,o=[],s="",l={};return void 0===n||0===Object.keys(n).length?(l=JSON.parse(JSON.stringify(t)),s=l.name):Array.isArray(n)?(n=JSON.parse(JSON.stringify(n)),l.value=n,l.name=t,l.type=typeof n[0]||"any",s=l.name):(n=JSON.parse(JSON.stringify(n)),l.schema=N(n),l.name=t,l.type="object",s=l.name),void 0===l[e.ID]&&(l[e.ID]=i.generateId()),x(l,e.TYPE_DEFINITION)?(o=Ee.collections._Type.insert(l),a=o[0]):r.invalidTypeDefinition(s),a},init:function(){k(),Ee.collection("_Logger"),Ee.collection("_Schema"),Ee.collection("_GeneratedSchema"),Ee.collection("_Model"),Ee.collection("_GeneratedModel"),Ee.collection("_Behavior"),Ee.collection("_Type"),Ee.collection("_Message"),Ee.collection("_Channel"),Ee.collection("_History")},clear:k,create:function(){!function(){let t=[],n=[],a=null,o={},i=[],l=null,c="",d="",u=0,m=0;for(s.inheritance={},s.inheritanceTree={},s.schemas={},s.generatedSchemas={},s.models={},s.generatedModels={},s.states={},s.type={},t=Ee.collections._Schema.find({}),m=t.length,u=0;u"),l=t.substring(0,a),l=l.replace("=>",""),r=-1!==l.indexOf("(")?l.split("(")[1].replace(")","").trim():l.trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+2,t.length).trim(),0===s.indexOf("{")&&(s=s.substring(1,s.lastIndexOf("}")).trim()),-1===s.indexOf("\n")&&(m=!0),d&&m&&-1===s.indexOf("return ")&&(s="return "+s)):(a=t.indexOf("{"),l=t.substring(0,a),r=l.split("(")[1].replace(")","").trim(),o=r.split(","),o.forEach((function(e){i.push(e.trim())})),s=t.substring(a+1),s=s.substring(0,s.lastIndexOf("}")).trim()),s=s.replace(/_this/g,"this"),""===i[0]&&(i=[]),n&&(i.push("$component"),i.push("$db"),i.push("$metamodel"),i.push("$workflow"),i.push("$behavior"),i.push("$state"),i.push("$log"),i.push("$helper"),i.push("$history")),c=u?""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };")(s):""!==i[0]?new Function("__action","return function "+y+" ("+i.join(", ")+") { return new Function('"+i.join("', '")+"', __action).apply(this, arguments) };")(s):new Function("__action","return function "+y+" () { return new Function(__action).apply(this, arguments) };")(s),c}var F={add:function(e,t,n,a,r,o){let s=i.generateId(),l=n.toString();return void 0===r&&(r=!1),void 0===a&&(a=!1),n=L(t,l,a),$[s]=n,Ee.collections._Behavior.insert({_id:s,component:e,state:t,action:l,useCoreAPI:a,core:r,context:o}),s},remove:function(e){let t=[];(e=e||{}).behaviorId=e.behaviorId||"",e.componentId=e.componentId||"",e.state=e.state||"",e.componentId&&(e.behaviorId?(Ee.collections._Behavior.remove({_id:e.behaviorId,component:e.componentId,state:e.state}),delete $[e.behaviorId]):(t=e.state?Ee.collections._Behavior.remove({component:e.componentId,state:e.state}):Ee.collections._Behavior.remove({component:e.componentId}),t.forEach((function(e){delete $[e]}))))},removeFromMemory:function(e){delete $[e]},getActions:function(t,n){let a=[],r=[],o=null;return r=Ee.collections._Behavior.find({component:t,state:n}),r.forEach((function(t){o=$[t[e.ID]],void 0===o&&(o=L(t.state,t.action,t.useCoreAPI),$[t[e.ID]]=o),a.push({useCoreAPI:t.useCoreAPI,context:t.context,action:o})})),a},clear:function(){$={}},get:function(e){return $[e]}};let q={};var V={set:function(e,t,n){q[e]={state:t,value:n}},get:function(e){return q[e]},clear:function(){q={}}};let H=[],G=-1,Y=!1;var U={isEnabled:function(){return Y},start:function(){Y=!0},stop:function(){Y=!1},pushState:function(e){H.push(e)},state:function e(){return e[e.length-1]},back:function(){let e=H[G],t={};if(e){switch(e.action){case"insert":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"remove":Ee.collections[e.collection].insert(JSON.parse(e.oldValue)),r.historyDocumentInserted(e.id,e.collection,e.oldValue);break;case"update":t[e.field]=JSON.parse(e.oldValue),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.oldValue)}G-=1}return G},forward:function(){G+=1;let e=H[G],t={};if(e)switch(e.action){case"insert":Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value);break;case"remove":Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection);break;case"update":t[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},t),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)}return G},get:function(e){let t=null;return t=e<0?H[H.length+e]:H[e],t},from:function(e){G=-1===e?H.length-1:e},dump:function(){return JSON.stringify({stack:H})},load:function(e){let t=!0;try{let n={},a={};n="string"==typeof e?JSON.parse(e).stack:e.stack,n.forEach((function(e){if(e)switch(e.action){case"insert":Ee.collections[e.collection]?(Ee.collections[e.collection].insert(JSON.parse(e.value)),r.historyDocumentInserted(e.id,e.collection,e.value)):t=!1;break;case"remove":Ee.collections[e.collection]?(Ee.collections[e.collection].remove({_id:e.id}),r.historyDocumentRemoved(e.id,e.collection)):t=!1;break;case"update":Ee.collections[e.collection]?(a[e.field]=JSON.parse(e.value),Ee.collections[e.collection].update({_id:e.id},a),r.historyDocumentUpdated(e.id,e.collection,e.field,e.value)):t=!1}}))}catch(e){t=!1}return t},clear:function(){H=[]}};function B(e){this.message=e,this.name="RuntimeError"}function z(e){return-1!==e.indexOf(".")}function K(e,t){let n=null,a=[],o=[],i=0,s=0,l=0,c=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s"):a.indexOf("{"),o=a.substring(0,r),o=o.replace("=>",""),i=-1!==o.indexOf("(")?o.split("(")[1].replace(")","").trim():o.trim(),s=i.split(","),""===s[0]&&(s=[]),l=s.length,d=J.isProperty(t,e),u=J.isLink(t,e),m=J.isCollection(t,e),!0){case m:c=[2,2];break;case d:c="array"===J.getModelPathType(e,t)?[2,2]:[1,1];break;case u:c=[1,1];break;default:c=K(e,t)}return c[0]<=l&&l<=c[1]&&(y=!0),y}function W(e){let t=(e=e||{}).component||null,n=e.methodName||"",a=e.args||"",o=[],i=[],s=[],l="",c=a.length,d=0,u=null,m=!0,y=!1,f=!1,p=!1;switch(l="Function"===t.constructor.name?t.name:t.constructor.name,y=J.isProperty(n,l),f=J.isLink(n,l),p=J.isCollection(n,l),o=function(e,t){let n=null,a=[],o=[],i=0,s=0;if(J.getModel(e)?n=J.getModel(e)[t]:r.unknownModel(e),n){if(a=n.params,a)for(i=a.length,s=0;s=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.on=new Function("__proxy","return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };")((function(e,n,a,o){let i="",s="",l=null;return a&&a.constructor&&"Boolean"!==a.constructor.name&&(l=a,a=!1,o=!0),ne.checkInput({component:this,methodName:"on",args:arguments})&&(J.isValidState(e,t)?J.isEvent(e,t)||J.isProperty(e,t)||J.isLink(e,t)||J.isCollection(e,t)||!(Ee.collections._Behavior.find({component:this.id(),state:e}).length>=1)?ne.checkInputNumbers(t,e,n)?(i=F.add(this.id(),e,n,a,o,l),s=V.get(this.id()),s&&s.state===e&&ne.process({id:i,data:s.value})):r.invalidParamNumberMethodOn(this.id(),this.constructor.name,e):r.behaviorNotUnique(t,e):r.invalidStateOn(t,e)),i}))}(n,a),function(e,t){e.off=new Function("__proxy","return function off (state, behaviorId) { return __proxy.apply(this, arguments) };")((function(e,n){ne.checkInput({component:this,methodName:"off",args:arguments})&&(J.isValidState(e,t)?F.remove({behaviorId:n,componentId:t,state:e}):r.invalidStateOff(t,e))}))}(n,a),function(e){e.require=new Function("__proxy","return function require (id) { return __proxy.apply(this, arguments) };")((function(e){return ye(e)}))}(n),function(e){e.init=new Function("__proxy","return function init (conf) { return __proxy.apply(this, arguments) };")((function(){}))}(n),function(e){e.destroy=new Function("__proxy","return function destroy () { return __proxy.apply(this) };")((function(){let e=this.id(),t=[],n=0,a=0;for(Ee.collections[e]&&(t=Ee.collections[e].remove()),delete ae[e],F.remove({componentId:e}),a=t.length,n=0;na[n]?1===t[n]?1:-1:0}))),a},e}function _e(e,t,n){let a=!0,r="";e:for(r in t)switch(!0){case"$eq"===r:if(t[r]instanceof RegExp){if(null===n[e].toString().match(t[r])){a=!1;break e}}else if(n[e]!==t[r]){a=!1;break e}break;case"$gt"===r:if(n[e]<=t[r]){a=!1;break e}break;case"$gte"===r:if(n[e]=t[r]){a=!1;break e}break;case"$lte"===r:if(n[e]>t[r]){a=!1;break e}break;case"$ne"===r:if(n[e]===t[r]){a=!1;break e}break;case"$in"===r:if(Array.isArray(t[r])&&-1===t[r].indexOf(n[e])){a=!1;break e}break;case"$nin"===r:if(Array.isArray(t[r])&&-1!==t[r].indexOf(n[e])){a=!1;break e}}return a}function ve(e,t){let n=!0,a=!1,r="",o=0,i=0;e:for(r in e){if(void 0===t[r]){n=!1;break}switch(!0){case e[r]instanceof RegExp:if(Array.isArray(t[r])&&!Array.isArray(e[r])){for(i=t[r].length,o=0;o 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! This file has been generated, do not edit it !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n \"name\": \"system-runtime\",\n \"master\": false,\n \"version\": \"6.0.0-beta.4\",\n \"description\": \"System Runtime\",\n \"schemas\": {\n \"1ac07185641fa9f\": {\n \"_name\": \"_Behavior\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"core\": \"property\",\n \"component\": \"property\",\n \"action\": \"property\",\n \"state\": \"property\",\n \"useCoreAPI\": \"property\",\n \"context\": \"property\",\n \"_id\": \"1ac07185641fa9f\"\n },\n \"104ad1f48518376\": {\n \"_id\": \"104ad1f48518376\",\n \"_name\": \"_Channel\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"send\": \"event\",\n \"$systemInstalled\": \"event\",\n \"$systemResolved\": \"event\",\n \"$systemStarted\": \"event\",\n \"$systemStopped\": \"event\",\n \"$systemUninstalled\": \"event\"\n },\n \"111df11e2b19fde\": {\n \"_id\": \"111df11e2b19fde\",\n \"_name\": \"_Component\",\n \"_inherit\": [],\n \"_core\": true,\n \"on\": \"method\",\n \"off\": \"method\",\n \"require\": \"method\",\n \"destroy\": \"method\",\n \"init\": \"method\",\n \"error\": \"event\"\n },\n \"1723516a30132ac\": {\n \"_name\": \"_Database\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"collections\": \"method\",\n \"insert\": \"event\",\n \"update\": \"event\",\n \"remove\": \"event\",\n \"_id\": \"1723516a30132ac\"\n },\n \"1268f1dddd1fea7\": {\n \"_name\": \"_Logger\",\n \"_core\": true,\n \"level\": \"property\",\n \"debug\": \"method\",\n \"info\": \"method\",\n \"warn\": \"method\",\n \"error\": \"method\",\n \"_id\": \"1268f1dddd1fea7\"\n },\n \"14caa1c46414ee1\": {\n \"_name\": \"_Message\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"event\": \"property\",\n \"from\": \"property\",\n \"data\": \"property\",\n \"_id\": \"14caa1c46414ee1\"\n },\n \"193f1166eb16609\": {\n \"_name\": \"_Metamodel\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"schema\": \"method\",\n \"model\": \"method\",\n \"type\": \"method\",\n \"create\": \"method\",\n \"_id\": \"193f1166eb16609\"\n },\n \"157931f7a31b61d\": {\n \"_id\": \"157931f7a31b61d\",\n \"_name\": \"_OSGi\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"install\": \"method\",\n \"uninstall\": \"method\",\n \"start\": \"method\",\n \"stop\": \"method\",\n \"status\": \"method\",\n \"bundle\": \"method\"\n },\n \"12e211d4cd120a6\": {\n \"_id\": \"12e211d4cd120a6\",\n \"_name\": \"_Runtime\",\n \"_inherit\": [\"_OSGi\"],\n \"_core\": true,\n \"version\": \"property\",\n \"system\": \"method\",\n \"message\": \"method\",\n \"ready\": \"event\"\n },\n \"1cb761fa4510dca\": {\n \"_id\": \"1cb761fa4510dca\",\n \"_name\": \"_System\",\n \"_inherit\": [\"_SystemOSGi\"],\n \"_core\": true,\n \"name\": \"property\",\n \"master\": \"property\",\n \"version\": \"property\",\n \"description\": \"property\",\n \"schemas\": \"property\",\n \"models\": \"property\",\n \"behaviors\": \"property\",\n \"types\": \"property\",\n \"components\": \"property\"\n },\n \"145fe10c7514298\": {\n \"_id\": \"145fe10c7514298\",\n \"_name\": \"_SystemOSGi\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"state\": \"property\",\n \"location\": \"property\",\n \"start\": \"method\",\n \"stop\": \"method\"\n },\n \"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n \"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n \"_name\": \"_History\",\n \"_core\": true,\n \"_inherit\": [\"_Component\"],\n \"back\": \"method\",\n \"forward\": \"method\",\n \"from\": \"method\",\n \"dump\": \"method\",\n \"get\": \"method\",\n \"load\": \"method\",\n \"start\": \"method\",\n \"stop\": \"method\",\n \"clear\": \"method\"\n }\n },\n \"models\": {\n \"166971fd9d107fd\": {\n \"_name\": \"_Behavior\",\n \"_core\": true,\n \"context\": {\n \"type\": \"any\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": null\n },\n \"core\": {\n \"type\": \"boolean\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"useCoreAPI\": {\n \"type\": \"any\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"component\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"action\": {\n \"type\": \"javascript\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"state\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"_id\": \"166971fd9d107fd\"\n },\n \"135c71078810af2\": {\n \"_id\": \"135c71078810af2\",\n \"_name\": \"_Channel\",\n \"_core\": true,\n \"send\": { \"params\": [{ \"name\": \"message\", \"type\": \"message\" }] },\n \"$systemInstalled\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemResolved\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemUninstalled\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemStarted\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemStopped\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n }\n },\n \"123751cb591de26\": {\n \"_id\": \"123751cb591de26\",\n \"_name\": \"_Component\",\n \"_core\": true,\n \"on\": {\n \"params\": [\n { \"name\": \"state\", \"type\": \"string\" },\n { \"name\": \"action\", \"type\": \"function\" },\n {\n \"name\": \"useCoreAPI\",\n \"type\": \"any\",\n \"mandatory\": false,\n \"default\": false\n },\n {\n \"name\": \"isCore\",\n \"type\": \"boolean\",\n \"mandatory\": false,\n \"default\": false\n }\n ]\n },\n \"off\": {\n \"params\": [\n { \"name\": \"state\", \"type\": \"string\", \"mandatory\": false },\n { \"name\": \"behaviorId\", \"type\": \"string\", \"mandatory\": false }\n ]\n },\n \"require\": { \"params\": [{ \"name\": \"id\", \"type\": \"string\" }] },\n \"destroy\": { \"params\": [] },\n \"init\": { \"params\": [{ \"name\": \"document\", \"type\": \"object\" }] },\n \"error\": { \"params\": [{ \"name\": \"e\", \"type\": \"errorInfo\" }] }\n },\n \"18a51169d7112d4\": {\n \"_name\": \"_Database\",\n \"_core\": true,\n \"collections\": { \"result\": \"object\" },\n \"insert\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbInsertEvent\" }] },\n \"update\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbUpdateEvent\" }] },\n \"remove\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbRemoveEvent\" }] },\n \"_id\": \"18a51169d7112d4\"\n },\n \"16b9d1ac2216ffe\": {\n \"_id\": \"16b9d1ac2216ffe\",\n \"_name\": \"_Logger\",\n \"_core\": true,\n \"level\": {\n \"type\": \"log\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"warn\"\n },\n \"debug\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"info\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"warn\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"error\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] }\n },\n \"1d9b6139411aa91\": {\n \"_name\": \"_Message\",\n \"_core\": true,\n \"event\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"from\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"data\": {\n \"type\": \"array\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": []\n },\n \"_id\": \"1d9b6139411aa91\"\n },\n \"1628c13c22152e6\": {\n \"_name\": \"_Metamodel\",\n \"_core\": true,\n \"schema\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"schema\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"model\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"model\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"type\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"type\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"create\": { \"params\": [] },\n \"_id\": \"1628c13c22152e6\"\n },\n \"100b91ed2211b15\": {\n \"_id\": \"100b91ed2211b15\",\n \"_name\": \"_OSGi\",\n \"install\": {\n \"params\": [\n { \"name\": \"url\", \"type\": \"any\", \"mandatory\": true, \"default\": \"\" },\n {\n \"name\": \"async\",\n \"type\": \"boolean\",\n \"mandatory\": false,\n \"default\": true\n }\n ],\n \"result\": \"string\"\n },\n \"uninstall\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"start\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"stop\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"status\": { \"result\": \"object\" },\n \"_core\": true,\n \"bundle\": { \"result\": \"string\" }\n },\n \"14c7c105b31a160\": {\n \"_id\": \"14c7c105b31a160\",\n \"_name\": \"_Runtime\",\n \"_core\": true,\n \"version\": {\n \"type\": \"string\",\n \"readOnly\": true,\n \"mandatory\": true,\n \"default\": \"6.0.0-beta.4\"\n },\n \"system\": {\n \"params\": [{ \"name\": \"params\", \"type\": \"any\", \"mandatory\": false }],\n \"result\": \"object\"\n },\n \"message\": {\n \"params\": [{ \"name\": \"msg\", \"type\": \"message\", \"mandatory\": true }]\n },\n \"ready\": {}\n },\n \"170521b88614387\": {\n \"_name\": \"_System\",\n \"_core\": true,\n \"name\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"master\": {\n \"type\": \"boolean\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"version\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"0.0.1\"\n },\n \"description\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"\"\n },\n \"schemas\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"models\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"behaviors\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"types\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"components\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"_id\": \"170521b88614387\"\n },\n \"1b2811b092143f5\": {\n \"_id\": \"1b2811b092143f5\",\n \"_name\": \"_SystemOSGi\",\n \"start\": {},\n \"stop\": {},\n \"_core\": true,\n \"state\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"none\"\n },\n \"location\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"\"\n }\n },\n \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n \"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n \"_name\": \"_History\",\n \"_description\": \"\",\n \"back\": { \"result\": \"number\" },\n \"forward\": { \"result\": \"number\" },\n \"dump\": { \"result\": \"string\" },\n \"_core\": true,\n \"from\": {\n \"params\": [\n {\n \"name\": \"index\",\n \"type\": \"number\",\n \"mandatory\": true,\n \"default\": -1\n }\n ],\n \"result\": \"any\"\n },\n \"get\": {\n \"params\": [\n {\n \"name\": \"index\",\n \"type\": \"number\",\n \"mandatory\": true,\n \"default\": -1\n }\n ],\n \"result\": \"object\"\n },\n \"load\": {\n \"params\": [\n { \"name\": \"dump\", \"type\": \"any\", \"mandatory\": true, \"default\": \"\" }\n ],\n \"result\": \"boolean\"\n },\n \"start\": { \"result\": \"any\" },\n \"stop\": { \"result\": \"any\" },\n \"clear\": { \"result\": \"any\" }\n }\n },\n \"behaviors\": {\n \"12e491859c13918\": {\n \"_id\": \"12e491859c13918\",\n \"component\": \"_Channel\",\n \"state\": \"$systemStarted\",\n \"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1e9021bd4e1bc6e\": {\n \"_id\": \"1e9021bd4e1bc6e\",\n \"component\": \"_Channel\",\n \"state\": \"$systemInstalled\",\n \"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1ba721201114b6b\": {\n \"_id\": \"1ba721201114b6b\",\n \"component\": \"_Component\",\n \"state\": \"destroy\",\n \"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"15486186f41a48c\": {\n \"_id\": \"15486186f41a48c\",\n \"component\": \"_Component\",\n \"state\": \"off\",\n \"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1da0a17878104c3\": {\n \"_id\": \"1da0a17878104c3\",\n \"component\": \"_Component\",\n \"state\": \"require\",\n \"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1a5111d17a1800c\": {\n \"_id\": \"1a5111d17a1800c\",\n \"component\": \"_Database\",\n \"state\": \"collections\",\n \"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1d993108fa18ef2\": {\n \"_id\": \"1d993108fa18ef2\",\n \"component\": \"_Logger\",\n \"state\": \"debug\",\n \"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"1a37a188e11fe73\": {\n \"_id\": \"1a37a188e11fe73\",\n \"component\": \"_Logger\",\n \"state\": \"error\",\n \"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"1edd21e12a16534\": {\n \"_id\": \"1edd21e12a16534\",\n \"component\": \"_Logger\",\n \"state\": \"info\",\n \"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"141f2143d3122a4\": {\n \"_id\": \"141f2143d3122a4\",\n \"component\": \"_Logger\",\n \"state\": \"level\",\n \"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"192401bab21304e\": {\n \"_id\": \"192401bab21304e\",\n \"component\": \"_Logger\",\n \"state\": \"warn\",\n \"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"11fc715e2f1a31e\": {\n \"_id\": \"11fc715e2f1a31e\",\n \"component\": \"_Metamodel\",\n \"state\": \"create\",\n \"action\": \"function create() {\\n $metamodel.create();\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1232f1f107142cf\": {\n \"_id\": \"1232f1f107142cf\",\n \"component\": \"_Metamodel\",\n \"state\": \"model\",\n \"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1365412f69153d2\": {\n \"_id\": \"1365412f69153d2\",\n \"component\": \"_Metamodel\",\n \"state\": \"schema\",\n \"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"194db147fe161a2\": {\n \"_id\": \"194db147fe161a2\",\n \"component\": \"_Metamodel\",\n \"state\": \"type\",\n \"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1ef951f1411b895\": {\n \"_id\": \"1ef951f1411b895\",\n \"component\": \"_OSGi\",\n \"state\": \"install\",\n \"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"14c1517b711cb78\": {\n \"_id\": \"14c1517b711cb78\",\n \"component\": \"_OSGi\",\n \"state\": \"uninstall\",\n \"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"105f219c6813643\": {\n \"_id\": \"105f219c6813643\",\n \"component\": \"_OSGi\",\n \"state\": \"start\",\n \"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n \"useCoreAPI\": false,\n \"core\": true\n },\n \"1a81a1f00d17269\": {\n \"_id\": \"1a81a1f00d17269\",\n \"component\": \"_OSGi\",\n \"state\": \"stop\",\n \"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n \"useCoreAPI\": false,\n \"core\": true\n },\n \"116851b602128d1\": {\n \"_id\": \"116851b602128d1\",\n \"component\": \"_OSGi\",\n \"state\": \"status\",\n \"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"19cf317d7217331\": {\n \"_id\": \"19cf317d7217331\",\n \"component\": \"_OSGi\",\n \"state\": \"bundle\",\n \"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"13010167f313f87\": {\n \"_id\": \"13010167f313f87\",\n \"component\": \"_Runtime\",\n \"state\": \"system\",\n \"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1cfa4145f614da8\": {\n \"_id\": \"1cfa4145f614da8\",\n \"component\": \"_Runtime\",\n \"state\": \"message\",\n \"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1cb9d103d41dd97\": {\n \"_id\": \"1cb9d103d41dd97\",\n \"component\": \"e89c617b6b15d24\",\n \"state\": \"start\",\n \"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n \"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n \"component\": \"_History\",\n \"state\": \"back\",\n \"action\": \"function back() { \\n return $history.back();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n \"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n \"component\": \"_History\",\n \"state\": \"forward\",\n \"action\": \"function forward() { \\n return $history.forward();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n \"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n \"component\": \"_History\",\n \"state\": \"dump\",\n \"action\": \"function dump() { \\n return $history.dump();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"f06254ad-187e-400c-a582-b5ab81f24747\": {\n \"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n \"component\": \"_History\",\n \"state\": \"get\",\n \"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n \"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n \"component\": \"_History\",\n \"state\": \"from\",\n \"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n \"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n \"component\": \"_History\",\n \"state\": \"load\",\n \"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n \"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n \"component\": \"_History\",\n \"state\": \"start\",\n \"action\": \"function start() { \\n return $history.start();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n \"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n \"component\": \"_History\",\n \"state\": \"stop\",\n \"action\": \"function stop() { \\n return $history.stop();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n \"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n \"component\": \"_History\",\n \"state\": \"clear\",\n \"action\": \"function clear() { \\n return $history.clear();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n }\n },\n \"types\": {\n \"css\": {\n \"_id\": \"h1d88311ac019211\",\n \"name\": \"css\",\n \"type\": \"string\",\n \"core\": true\n },\n \"date\": {\n \"_id\": \"c17cad1bc3d17752\",\n \"name\": \"date\",\n \"type\": \"object\",\n \"core\": true\n },\n \"json\": {\n \"_id\": \"e1d25a12e67127ed\",\n \"name\": \"json\",\n \"type\": \"object\",\n \"core\": true\n },\n \"dbInsertEvent\": {\n \"_id\": \"148ef1e19810e6d\",\n \"core\": true,\n \"name\": \"dbInsertEvent\",\n \"type\": \"object\",\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"document\": { \"type\": \"object\", \"mandatory\": true, \"default\": {} }\n }\n },\n \"dbRemoveEvent\": {\n \"_id\": \"1952e1ac4213f4a\",\n \"name\": \"dbRemoveEvent\",\n \"type\": \"object\",\n \"core\": true,\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"id\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n }\n },\n \"dbUpdateEvent\": {\n \"_id\": \"1f5c41309711752\",\n \"core\": true,\n \"name\": \"dbUpdateEvent\",\n \"type\": \"object\",\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"id\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"field\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"value\": { \"type\": \"any\", \"mandatory\": true, \"default\": null }\n }\n },\n \"collection\": {\n \"_id\": \"d1c0d0130c616199\",\n \"name\": \"collection\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": [\"string\"], \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"array\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false },\n \"kind\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"event\": {\n \"_id\": \"g1668d1de2d1ff6f\",\n \"name\": \"event\",\n \"type\": \"object\",\n \"schema\": {\n \"params\": { \"type\": [\"parameter\"], \"mandatory\": false },\n \"description\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"html\": {\n \"_id\": \"y161c21320b11acb\",\n \"name\": \"html\",\n \"type\": \"string\",\n \"core\": true\n },\n \"javascript\": {\n \"_id\": \"s13d4c1fdf916504\",\n \"name\": \"javascript\",\n \"type\": \"string\",\n \"core\": true\n },\n \"link\": {\n \"_id\": \"p124601801d1dbfa\",\n \"name\": \"link\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": \"string\", \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"{type}\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false },\n \"kind\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"log\": {\n \"_id\": \"d1fd161a4a4149fc\",\n \"name\": \"log\",\n \"type\": \"string\",\n \"value\": [\"debug\", \"info\", \"warn\", \"error\", \"off\"],\n \"core\": true\n },\n \"message\": {\n \"_id\": \"l13b061ac571272d\",\n \"name\": \"message\",\n \"type\": \"object\",\n \"schema\": {\n \"event\": { \"type\": \"string\", \"mandatory\": true },\n \"from\": { \"type\": \"string\", \"mandatory\": false },\n \"data\": { \"type\": \"array\", \"mandatory\": true }\n },\n \"core\": true\n },\n \"method\": {\n \"_id\": \"x1227218eed1f3e9\",\n \"name\": \"method\",\n \"type\": \"object\",\n \"schema\": {\n \"result\": { \"type\": \"any\", \"mandatory\": false },\n \"params\": { \"type\": [\"parameter\"], \"mandatory\": false },\n \"description\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"osgiStates\": {\n \"_id\": \"q1f0ca120fc13fb3\",\n \"name\": \"osgiStates\",\n \"type\": \"string\",\n \"value\": [\n \"none\",\n \"installed\",\n \"resolved\",\n \"starting\",\n \"active\",\n \"stopping\",\n \"uninstalled\"\n ],\n \"core\": true\n },\n \"parameter\": {\n \"_id\": \"e1b18e16c6c195ad\",\n \"name\": \"parameter\",\n \"type\": \"object\",\n \"schema\": {\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"name\": { \"type\": \"string\", \"mandatory\": true },\n \"type\": { \"type\": \"any\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": false },\n \"default\": { \"type\": \"{type}\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"property\": {\n \"_id\": \"a16a3a1ae051a55d\",\n \"name\": \"property\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": \"string\", \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"{type}\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"text\": {\n \"_id\": \"c136fc129a912f54\",\n \"name\": \"text\",\n \"type\": \"string\",\n \"core\": true\n },\n \"errorInfo\": {\n \"_id\": \"e198761fc0b1ae8a\",\n \"name\": \"errorInfo\",\n \"type\": \"object\",\n \"schema\": {\n \"message\": { \"type\": \"string\", \"mandatory\": true },\n \"stack\": { \"type\": \"object\", \"mandatory\": true }\n },\n \"core\": true\n }\n },\n \"components\": {\n \"_Channel\": { \"channel\": { \"_id\": \"channel\" } },\n \"_Database\": { \"db\": { \"_id\": \"db\" } },\n \"_Logger\": { \"logger\": { \"_id\": \"logger\", \"level\": \"warn\" } },\n \"_Metamodel\": { \"metamodel\": { \"_id\": \"metamodel\" } },\n \"_Runtime\": { \"runtime\": { \"_id\": \"runtime\", \"version\": \"6.0.0-beta.4\" } },\n \"_History\": { \"history\": { \"_id\": \"history\" } }\n },\n \"_id\": \"e89c617b6b15d24\"\n}\n\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACb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GACzCsL,SAAY,CAAEvL,KAAQ,UAAWC,WAAa,GAC9CA,UAAa,CAAED,KAAQ,UAAWC,WAAa,GAC/CG,QAAW,CAAEJ,KAAQ,SAAUC,WAAa,GAC5Ca,YAAe,CAAEd,KAAQ,SAAUC,WAAa,GAChDuL,MAAS,CAAExL,KAAQ,SAAUC,WAAa,IAE5CY,MAAQ,GAEV+gB,KAAQ,CACN7hB,IAAO,mBACPW,KAAQ,OACRV,KAAQ,SACRa,MAAQ,GAEVghB,UAAa,CACX9hB,IAAO,mBACPW,KAAQ,YACRV,KAAQ,SACRW,OAAU,CACRW,QAAW,CAAEtB,KAAQ,SAAUC,WAAa,GAC5C6V,MAAS,CAAE9V,KAAQ,SAAUC,WAAa,IAE5CY,MAAQ,IAGZke,WAAc,CACZS,SAAY,CAAEY,QAAW,CAAErgB,IAAO,YAClC+hB,UAAa,CAAEC,GAAM,CAAEhiB,IAAO,OAC9BqC,QAAW,CAAE4f,OAAU,CAAEjiB,IAAO,SAAUmB,MAAS,SACnD+gB,WAAc,CAAEC,UAAa,CAAEniB,IAAO,cACtC6I,SAAY,CAAEuZ,QAAW,CAAEpiB,IAAO,UAAW2e,QAAW,iBACxD0D,SAAY,CAAEC,QAAW,CAAEtiB,IAAO,aAEpCA,IAAO,oBD/7BTiY,GAASzV,GAAWC,IAAI2d,IACxBC,GAAU7d,GAAWC,IAAI,WAEzBwV,GAAOpQ,MAAM,aACbwY,GAAQE,iBAAiBH,IACzBnI,GAAOpQ,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file +{"version":3,"file":"system-runtime.js","sources":["../src/mson.js","../src/log.js","../src/helper.js","../src/metamodel.js","../src/behavior.js","../src/state.js","../src/history.js","../src/workflow.js","../src/component.js","../src/db.js","../src/runtime.js","../src/system.js"],"sourcesContent":["/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module mson\n * @description This module contains all the mson definition.\n */\n\nconst ID = '_id'\nconst NAME = '_name'\nconst DESCRIPTION = '_description'\nconst INHERIT = '_inherit'\nconst CLASS = '_class'\nconst CORE = '_core'\n\nconst INTERNAL_NAMES = [\n '_id',\n '_name',\n '_inherit',\n '_description',\n '_class',\n '_core',\n]\n\nconst PROPERTY_TYPE = 'property'\nconst COLLECTION_TYPE = 'collection'\nconst LINK_TYPE = 'link'\nconst METHOD_TYPE = 'method'\nconst EVENT_TYPE = 'event'\n\nconst INTERNAL_TYPES = ['property', 'collection', 'link', 'method', 'event']\n\nconst DEFAULT_TYPES = [\n 'boolean',\n 'string',\n 'number',\n 'object',\n 'function',\n 'array',\n 'date',\n 'any',\n]\n\nconst SCHEMA_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n default: ['_Component'],\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst MODEL_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n _name: {\n type: 'string',\n mandatory: true,\n },\n _inherit: {\n type: ['string'],\n mandatory: false,\n },\n _class: {\n type: 'boolean',\n mandatory: false,\n },\n _core: {\n type: 'boolean',\n mandatory: false,\n },\n _description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nconst TYPE_DEFINITION = {\n _id: {\n type: 'string',\n mandatory: true,\n },\n name: {\n type: 'string',\n mandatory: true,\n },\n type: {\n type: 'string',\n mandatory: true,\n },\n schema: {\n type: 'object',\n mandatory: false,\n },\n value: {\n type: ['any'],\n mandatory: false,\n },\n core: {\n type: 'boolean',\n mandatory: false,\n },\n description: {\n type: 'string',\n mandatory: false,\n },\n}\n\nexport default {\n ID,\n NAME,\n DESCRIPTION,\n INHERIT,\n CLASS,\n CORE,\n INTERNAL_NAMES,\n PROPERTY_TYPE,\n COLLECTION_TYPE,\n LINK_TYPE,\n METHOD_TYPE,\n EVENT_TYPE,\n INTERNAL_TYPES,\n DEFAULT_TYPES,\n SCHEMA_DEFINITION,\n MODEL_DEFINITION,\n TYPE_DEFINITION,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module log\n * @requires metamodel\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions that write a log\n */\n\nimport $metamodel from './metamodel.js'\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet currentLevel = 'warn' // eslint-disable-line no-unused-vars\nlet loggerRef = null\nlet fakeLoggerRef = {\n currentLevel: 'warn',\n level: function debug(levelName) {\n if (levelName) {\n this.currentLevel = levelName\n }\n return this.currentLevel\n },\n debug: function debug(message) {\n if (this.currentLevel === 'debug') {\n console.log('runtime: ' + message)\n }\n },\n info: function info(message) {\n if (this.currentLevel === 'info' || this.currentLevel === 'debug') {\n console.info('runtime: ' + message)\n }\n },\n warn: function warning(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug'\n ) {\n console.warn('runtime: ' + message)\n }\n },\n error: function error(message) {\n if (\n this.currentLevel === 'info' ||\n this.currentLevel === 'warn' ||\n this.currentLevel === 'debug' ||\n this.currentLevel === 'error'\n ) {\n console.error('runtime: ' + message)\n }\n },\n}\n\n/**\n * @method getLogger\n * @return {_Logger} _Logger instance\n * @private\n * @description Get the _Logger instance\n */\nfunction getLogger() {\n let loggerId = ''\n let loggers = []\n let result = null\n\n if (!$metamodel.getModel('_Logger')) {\n result = fakeLoggerRef\n } else {\n loggers = $db.collections._Logger.find()\n if (loggers.length) {\n loggerId = loggers[0][$mson.ID]\n\n if ($component.get(loggerId)) {\n loggerRef = $component.get(loggerId)\n result = loggerRef\n } else {\n result = fakeLoggerRef\n }\n } else {\n result = fakeLoggerRef\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method level\n * @param {String} levelName name of the level\n * @description Set the level of the log\n */\nfunction level(levelName) {\n currentLevel = levelName\n}\n\n/**\n * @method unknownProperty\n * @param {String} propertyName the name of the property\n * @param {Object} schema the schema definition\n * @description A property of a schema is unknown\n */\nfunction unknownProperty(propertyName, schema) {\n let message = ''\n\n if (schema[$mson.NAME]) {\n message =\n \"unknown property '\" +\n propertyName +\n \"' for the definition of '\" +\n schema[$mson.NAME] +\n \"'\"\n } else {\n message = \"unknown property '\" + propertyName + \"' for a model\"\n }\n\n getLogger().warn(message)\n}\n\n/**\n * @method invalidPropertyType\n * @param {String} propertyName name of the peropety\n * @param {String} type the type defined by the schema\n * @param {String} property the property\n * @description Invalid type for a property\n */\nfunction invalidPropertyType(propertyName, type, property) {\n let realType =\n property && property.constructor\n ? property.constructor.name\n : typeof property\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidEnumValue\n * @param {Object} value the value\n * @param {String} type the type defined by the schema\n * @description Invalid value for type enum\n */\nfunction invalidEnumValue(value, type) {\n getLogger().warn(\n \"'\" + value + \"' is an invalid value for the type enum '\" + type + \"'\"\n )\n}\n\n/**\n * @method invalidClassName\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidClassName(componentId, type, constructorName) {\n getLogger().warn(\n \"invalid component '\" +\n componentId +\n \"' for a collection: expected a component of class '\" +\n type +\n \"' instead of '\" +\n constructorName +\n \"'\"\n )\n}\n\n/**\n * @method missingProperty\n * @param {String} propertyName name of the property\n * @description Missing a property\n */\nfunction missingProperty(propertyName) {\n getLogger().warn(\"property '\" + propertyName + \"' is missing\")\n}\n\n/**\n * @method missingImplementation\n * @param {String} name name of the missing schema\n * @description A class definition is missing\n */\nfunction missingImplementation(name) {\n getLogger().warn(\"schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method invalidTypeImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Invalid type for a property of a class definition\n */\nfunction invalidTypeImp(property, className) {\n getLogger().error(\n \"the property '\" + property + \"' of \" + className + ' model is invalid'\n )\n}\n\n/**\n * @method missingPropertyImp\n * @param {String} property a property\n * @param {String} className a class name\n * @description Missing a property for a class definition\n */\nfunction missingPropertyImp(property, className) {\n getLogger().warn(\n \"missing property '\" + property + \"' in the model '\" + className + \"'\"\n )\n}\n\n/**\n * @method unknownPropertyImp\n * @param {String} property a property\n * @param {Object} schema a schema\n * @description Unkown property for a class definition\n */\nfunction unknownPropertyImp(property, schema) {\n getLogger().error(\n \"the model '\" + schema + \"' has an unknown property '\" + property + \"'\"\n )\n}\n\n/**\n * @method invalidTypeDefinition\n * @param {String} name a type definition\n * @description Try to add an invalid type\n */\nfunction invalidTypeDefinition(name) {\n getLogger().warn(\"the type '\" + name + \"' is not valid\")\n}\n\n/**\n * @method invalidPropertyName\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type type defined by the schema\n * @description Invalid property name\n */\nfunction invalidPropertyName(id, className, propertyName, propertyValue, type) {\n let classInfo = ''\n let realType = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n if (typeof type === 'string') {\n realType =\n propertyValue && propertyValue.constructor\n ? propertyValue.constructor.name\n : typeof propertyValue\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n realType = type && type.constructor ? type.constructor.name : typeof type\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n classInfo +\n \": expected type 'string' instead of type '\" +\n realType +\n \"'\"\n )\n }\n}\n\n/**\n * @method readOnlyProperty\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} propertyName name of the property\n * @description Trying to set a read-only property\n */\nfunction readOnlyProperty(id, className, propertyName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"can not set read-only property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidDocumentOnDbInsert\n * @param {String} doc a document\n * @param {String} collectionName the name of the collection\n * @description Invalid document on a System Runtime database insert operation\n */\nfunction invalidDocumentOnDbInsert(doc, collectionName) {\n getLogger().warn(\n \"invalid document '\" +\n JSON.stringify(doc).replace(/,/g, ', ') +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidPropertyTypeOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} id id of the component\n * @param {String} propertyName name of the property\n * @param {String} propertyValue value of the property\n * @param {String} type expected type defined by the schema\n * @description Invalid property on a System Runtime database update operation\n */\nfunction invalidPropertyTypeOnDbUpdate(\n collectionName,\n id,\n propertyName,\n propertyValue,\n type\n) {\n getLogger().warn(\n \"invalid type for the property '\" +\n propertyName +\n \"' of the document '\" +\n id +\n \"' (\" +\n collectionName +\n \" collection) with the value '\" +\n JSON.stringify(propertyValue) +\n \"': expected type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownPropertyOnDbUpdate\n * @param {String} collectionName the name of the collection\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Unkonw property on a System Runtime database update operation\n */\nfunction unknownPropertyOnDbUpdate(propertyName, collectionName, id) {\n getLogger().warn(\n \"unknown property '\" +\n propertyName +\n \"' for document '\" +\n id +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method unknownMethod\n * @param {String} classId id of the class\n * @param {String} methodName name of the method\n * @description Call an unknown method of a class\n */\nfunction unknownMethod(classId, methodName) {\n getLogger().warn(\n \"try to call an unknown action '\" +\n methodName +\n \"' for the class '\" +\n classId +\n \"'\"\n )\n}\n\n/**\n * @method invalidCollectionName\n * @param {String} name name of the collection\n * @description Try to create an invalid DatabaseCollection\n */\nfunction invalidCollectionName(name) {\n getLogger().warn(\n \"invalid name for the collection '\" +\n name +\n \"': there is no schema '\" +\n name +\n \"'\"\n )\n}\n\n/**\n * @method invalidResultType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name ot the method\n * @param {String} expectedType expected type\n * @param {String} type current type\n * @description Invalid type result of a method\n */\nfunction invalidResultType(id, className, methodName, expectedType, type) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid type for the result of action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n expectedType +\n \"' instead of type '\" +\n type +\n \"'\"\n )\n}\n\n/**\n * @method unknownComponent\n * @param {String} id id of the class\n * @param {String} componentId id of the component\n * @description Unknown class\n */\nfunction unknownComponent(className, componentId) {\n getLogger().warn(\n \"unkown class name '\" + className + \"' for component '\" + componentId + \"'\"\n )\n}\n\n/**\n * @method invalidParamNumber\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a method\n */\nfunction invalidParamNumber(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid number of parameters when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method invalidParamType\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @param {String} paramName name of the parameter\n * @description Invalid type parameters for a method\n */\nfunction invalidParamType(id, className, methodName, paramName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n if (paramName !== undefined) {\n getLogger().warn(\n \"invalid type for the parameter '\" +\n paramName +\n \"' when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n } else {\n getLogger().warn(\n \"invalid type for a parameter when calling the action '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n }\n}\n\n/**\n * @method behaviorNotUnique\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Add a more than one behavior to a state\n */\nfunction behaviorNotUnique(id, stateName) {\n getLogger().warn(\n \"try to add more than one action for the state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOn\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description Can not add a behavior with an invalid state\n */\nfunction invalidStateOn(id, stateName) {\n getLogger().warn(\n \"try to add an action to an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidStateOff\n * @param {String} id id of the class\n * @param {String} stateName name of the state\n * @description The call to a remove state of the behavior module is invalid\n */\nfunction invalidStateOff(id, stateName) {\n getLogger().warn(\n \"try to remove an action from an unkwown state '\" +\n stateName +\n \"' on class '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method masterSystemNotFound\n * @description The master system is not found\n */\nfunction masterSystemNotFound() {\n getLogger().warn('can not export the database because no system was defined')\n}\n\n/**\n * @method invalidType\n * @param {String} name name of the type\n * @param {String} value value of the type\n * @param {String} typeName expected type defined by the schema\n * @description Invalid type\n */\nfunction invalidType(name, value, typeName) {\n let realType =\n name && value.constructor ? value.constructor.name : typeof value\n\n getLogger().warn(\n \"invalid value for property '\" +\n name +\n \"': expected type '\" +\n typeName +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n}\n\n/**\n * @method invalidConfiguration\n * @param {Object} obj an object\n * @param {String} type expected type for the configuration\n * @description Invalid class name\n */\nfunction invalidConfiguration(obj, type) {\n getLogger().warn(\n \"invalid type for '\" + JSON.stringify(obj) + \"': expected '\" + type + \"'\"\n )\n}\n\n/**\n * @method unknownType\n * @param {String} value value\n * @description Unknown type\n */\nfunction unknownType(value) {\n getLogger().warn(\"unknown type for value '\" + JSON.stringify(value) + \"'\")\n}\n\n/**\n * @method unknownPath\n * @param {String} path path\n * @param {String} path subpath\n * @description Unknown subpath in a path\n */\nfunction unknownPath(path, subpath) {\n getLogger().warn(\n \"the path '\" + path + \"' has an unkown subpath '\" + subpath + \"'\"\n )\n}\n\n/**\n * @method canNotYetValidate\n * @param {String} id id of the component\n * @param {String} className name of the class\n * @description A component has not been alreay validated\n */\nfunction canNotYetValidate(id, className) {\n getLogger().debug(\n \"can not yet validate if the document '\" +\n id +\n \"' is compliant with \" +\n className +\n ' model'\n )\n}\n\n/**\n * @method invalidChannelEvent\n * @param {String} message message send\n * @param {String} eventName name of the event\n * @param {String} type expected type\n * @description A message send by the channel is invalid\n */\nfunction invalidChannelEvent(message, eventName, type) {\n getLogger().warn(\n \"invalid type for the message '\" +\n JSON.stringify(message) +\n \"': expected type '\" +\n type +\n \"' for event '\" +\n eventName +\n \"'\"\n )\n}\n\n/**\n * @method invalidParamNumberMethodOn\n * @param {String} id id of the component\n * @param {String} className class name of the component\n * @param {String} methodName name of the component\n * @description invalid parameter number for a behavior add with 'on' method\n */\nfunction invalidParamNumberMethodOn(id, className, methodName) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n getLogger().warn(\n \"invalid number of parameters when adding an action for the state '\" +\n methodName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo\n )\n}\n\n/**\n * @method updateUuid\n * @param {String} currentId id of the component\n * @param {String} newId of the component\n * @param {Boolean} alreadyUsed newId already used\n * @description Change the id of a component\n */\nfunction updateUuid(currentId, newId, alreadyUsed) {\n if (alreadyUsed) {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"' that is already used\"\n )\n } else {\n getLogger().warn(\n \"try to update a component of id '\" +\n currentId +\n \"' with the new id '\" +\n newId +\n \"'\"\n )\n }\n}\n\n/**\n * @method invalidUseOfComponent\n * @param {String} id id of the component\n * @description Try to change the state of a component that has been destroyed\n */\nfunction invalidUseOfComponent(id) {\n getLogger().warn(\n \"try to change the state of the destroyed component '\" + id + \"'\"\n )\n}\n\n/**\n * @method invalidSchema\n * @param {String} name name of the schema\n * @description Try to add an invalid schema\n */\nfunction invalidSchema(name) {\n getLogger().warn(\n \"the schema '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidModel\n * @param {String} name name of the model\n * @description Try to add an invalid model\n */\nfunction invalidModel(name) {\n getLogger().warn(\n \"the model '\" +\n name +\n \"' is not valid, it has been removed from the metamodel\"\n )\n}\n\n/**\n * @method invalidParameters\n * @param {String} classId class name of the component\n * @param {String} document document\n * @description Invalid parameters set when creating an instance of a class\n */\nfunction invalidParameters(classId, document) {\n let id = document && document._id ? document._id : ''\n\n getLogger().warn(\n \"the parameters for creating '\" +\n id +\n \"' component (\" +\n classId +\n ' model) are not compliant with the model'\n )\n}\n\n/**\n * @method destroyedComponentCall\n * @param {String} propertyName name of the property\n * @param {String} id id of the component\n * @description Try to get the property of a destroyed component\n */\nfunction destroyedComponentCall(propertyName, id) {\n getLogger().warn(\n \"trying to get the property '\" +\n propertyName +\n \"' on the destroyed component '\" +\n id +\n \"'\"\n )\n}\n\n/**\n * @method invalidConctructorParameters\n * @param {String} object configuration\n * @param {String} name schema name\n * @description Invalid parameter type when creating an instance of a class\n */\nfunction invalidConctructorParameters(object, name) {\n getLogger().warn(\n \"the constructor parameter '\" +\n JSON.stringify(object).replace(/,/g, ', ') +\n \"' for creating a component of class '\" +\n name +\n \"' is not an object\"\n )\n}\n\n/**\n * @method unknownModel\n * @param {String} classId id of the class\n * @description Get the information of an unkown model\n */\nfunction unknownModel(classId) {\n getLogger().warn(\"the model '\" + classId + \"' does not exist\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema\n * @description A schema is missing\n */\nfunction missingSchema(name) {\n getLogger().warn(\"the schema '\" + name + \"' is missing\")\n}\n\n/**\n * @method missingSchema\n * @param {String} name name of the schema where the cyclic dependency was found\n * @description A cyclic dependency was found\n */\nfunction cyclicDependency(name) {\n if (name) {\n getLogger().error(\n \"a cyclic inheritance dependency with the schema '\" +\n name +\n \"’ has been found, please check the '_inherit' property of this schema\"\n )\n } else {\n getLogger().error(\n \"a cyclic inheritance dependency has been found, please check the '_inherit' properties of the schemas\"\n )\n }\n}\n\n/**\n * @method invalidEnumType\n * @param {Object} value the value\n * @param {String} typeName name of the type\n * @param {String} type typeName of the type\n * @description Invalid type for a type enum\n */\nfunction invalidEnumType(value, typeName, type) {\n let realType = ''\n\n if (typeof type !== 'undefined' && type !== typeof value) {\n realType =\n value && value.constructor ? value.constructor.name : typeof value\n getLogger().warn(\n \"invalid type for the type '\" +\n typeName +\n \"': expected type '\" +\n type +\n \"' instead of type '\" +\n realType +\n \"'\"\n )\n } else {\n getLogger().warn(\"invalid type for the type '\" + typeName + \"'\")\n }\n}\n\n/**\n * @method loadSchema\n * @param {String} name name of the schema\n * @description Load schema\n */\nfunction loadSchema(name) {\n getLogger().debug(\"load schema '\" + name + \"'\")\n}\n\n/**\n * @method loadModel\n * @param {String} name name of the model\n * @description Load model\n */\nfunction loadModel(name) {\n getLogger().debug(\"load model '\" + name + \"'\")\n}\n\n/**\n * @method loadType\n * @param {String} name name of the type\n * @description Load type\n */\nfunction loadType(name) {\n getLogger().debug(\"load type '\" + name + \"'\")\n}\n\n/**\n * @method generatingSchema\n * @param {String} name name of the schema\n * @description Generate schema\n */\nfunction generatingSchema(name) {\n getLogger().debug('generating ' + name + ' schema ...')\n}\n\n/**\n * @method checkModel\n * @param {String} name name of the model\n * @description Check model\n */\nfunction checkModel(name) {\n getLogger().debug('analyzing ' + name + ' model...')\n}\n\n/**\n * @method createClass\n * @param {String} name name of the class\n * @description Create class\n */\nfunction createClass(name) {\n getLogger().debug(name + ' class has been created')\n}\n\n/**\n * @method initDb\n * @description Init the database\n */\nfunction initDb() {\n getLogger().debug('initializing data store...')\n}\n\n/**\n * @method actionInvokeError\n * @param {String} state state\n * @param {String} id component id\n * @param {String} className component class name\n * @param {String} message\n * @description An error happened when invoking a behavior\n */\nfunction actionInvokeError(state, id, className, message) {\n if (className !== 'Function') {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"' (\" +\n className +\n ' class): ' +\n message\n )\n } else {\n getLogger().error(\n \"error when calling the action '\" +\n state +\n \"' on component '\" +\n id +\n \"': \" +\n message\n )\n }\n}\n\n/**\n * @method invalidSchemaPropertyName\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaPropertyName(name, propName) {\n getLogger().warn(\n \"invalid name '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': a property name can not begin with '_'\"\n )\n}\n\n/**\n * @method invalidSchemaProperty\n * @param {String} name name of the schema\n * @param {String} propName name of the property\n * @description Invalid name for the property of a schema\n */\nfunction invalidSchemaProperty(name, propName) {\n getLogger().warn(\n \"invalid property '\" +\n propName +\n \"' for schema '\" +\n name +\n \"': only 'property', 'link', 'collection', 'method' and 'event' are allowed\"\n )\n}\n\n/**\n * @method invalidPropertyFormat\n * @param {String} obj definition of a property\n * @description Invalid format for the definition of a property\n */\nfunction invalidPropertyFormat(obj) {\n getLogger().warn(\n \"invalid format for a definition of a property: '\" +\n obj +\n \"' is not an object\"\n )\n}\n\n/**\n * @method invalidState\n * @param {String} model name of the model\n * @param {String} state invalid state\n * @description Invalid state\n */\nfunction invalidState(model, state) {\n getLogger().warn(\n \"invalid state '\" + state + \"' for the model '\" + model + \"'\"\n )\n}\n\n/**\n * @method unknownContext\n * @param {String} className name of the class\n * @param {String} methodName name of the method\n * @description Invoke a method class without a context\n */\nfunction unknownContext(className, methodName) {\n getLogger().warn(\n \"invoke the action '\" +\n methodName +\n \"' on the class '\" +\n className +\n \"' without a valid context\"\n )\n}\n\n/**\n * @method historyDocumentInserted\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} document\n * @description Created document from history\n */\nfunction historyDocumentInserted(id, collectionName, doc) {\n getLogger().debug(\n \"Created component of id '\" +\n id +\n \"' ('\" +\n collectionName +\n \" collection) with document '\" +\n doc +\n \"'\"\n )\n}\n\n/**\n * @method historyDocumentRemoved\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @description Removed document from history\n */\nfunction historyDocumentRemoved(id, collectionName) {\n getLogger().debug(\n \"Destroyed component of id '\" + id + \"' (\" + collectionName + ' collection)'\n )\n}\n\n/**\n * @method historyDocumentUpdated\n * @param {Object} id id of the component\n * @param {String} collectionName collectionName of the component\n * @param {String} fieldName field name of the component\n * @param {String} value value of the field\n * @description Updated document from history\n */\nfunction historyDocumentUpdated(id, collectionName, fieldName, value) {\n getLogger().debug(\n \"Updated field '\" +\n fieldName +\n \"' of component of id '\" +\n id +\n \"' with value '\" +\n value +\n \"' (\" +\n collectionName +\n ' collection)'\n )\n}\n\n/**\n * @method invalidCollectionItem\n * @param {String} componentId id of the component\n * @param {String} type the type defined by the schema\n * @param {String} constructorName name of the component class\n * @description Invalid class name for a component\n */\nfunction invalidCollectionItem(\n id,\n className,\n propertyName,\n propertyValue,\n type\n) {\n let classInfo = ''\n\n if (className !== 'Function') {\n classInfo = ' (' + className + ' class)'\n }\n\n getLogger().warn(\n \"invalid value for property '\" +\n propertyName +\n \"' on component '\" +\n id +\n \"'\" +\n classInfo +\n \": expected type '\" +\n type +\n \"' for all items of the collection '\" +\n JSON.stringify(propertyValue) +\n \"'\"\n )\n}\n\nexport default {\n level,\n unknownProperty,\n invalidPropertyType,\n invalidEnumValue,\n invalidClassName,\n missingProperty,\n missingImplementation,\n invalidTypeImp,\n missingPropertyImp,\n unknownPropertyImp,\n invalidTypeDefinition,\n invalidPropertyName,\n readOnlyProperty,\n invalidDocumentOnDbInsert,\n invalidPropertyTypeOnDbUpdate,\n unknownPropertyOnDbUpdate,\n unknownMethod,\n invalidCollectionName,\n invalidResultType,\n unknownComponent,\n invalidParamNumber,\n invalidParamType,\n behaviorNotUnique,\n invalidStateOn,\n invalidStateOff,\n masterSystemNotFound,\n invalidType,\n invalidConfiguration,\n unknownType,\n unknownPath,\n canNotYetValidate,\n invalidChannelEvent,\n invalidParamNumberMethodOn,\n updateUuid,\n invalidUseOfComponent,\n invalidSchema,\n invalidModel,\n invalidParameters,\n destroyedComponentCall,\n invalidConctructorParameters,\n unknownModel,\n missingSchema,\n cyclicDependency,\n invalidEnumType,\n loadSchema,\n loadModel,\n loadType,\n generatingSchema,\n checkModel,\n createClass,\n initDb,\n actionInvokeError,\n invalidSchemaPropertyName,\n invalidSchemaProperty,\n invalidPropertyFormat,\n invalidState,\n unknownContext,\n historyDocumentInserted,\n historyDocumentRemoved,\n historyDocumentUpdated,\n invalidCollectionItem,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module helper\n * @requires db\n * @requires component\n * @requires mson\n * @description This module contains all the functions used by all the modules\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $mson from './mson.js'\n\n/* Private property */\n\nlet runtimeRef = null\n\n/* Public method */\n\n/**\n * @method isRuntime\n * @returns {Boolean} true if a System Runtime instance exist\n * @description Check if a System Runtime instance exists\n */\nfunction isRuntime() {\n let result = false\n\n if ($db.collections._Runtime && $db.collections._Runtime.find().length) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method getRuntime\n * @returns {_Runtime} System Runtime instance\n * @description Get the System Runtime instance\n */\nfunction getRuntime() {\n let runtimeId = ''\n let search = $db.collections._Runtime.find()\n\n if (!runtimeRef && search[0]) {\n runtimeId = search[0][$mson.ID]\n runtimeRef = $component.get(runtimeId)\n }\n\n return runtimeRef\n}\n\n/**\n * @method isOnNode\n * @returns {Boolean} true if a System Runtime is running on node\n * @description Check if a System Runtime is running on node\n */\nfunction isOnNode() {\n let result = false\n\n if (typeof window === 'undefined' && typeof global !== 'undefined') {\n result = true\n }\n\n return result\n}\n\n/**\n * @method generateId\n * @returns {String} a uuid\n * @description Generate a uuid\n */\nfunction generateId() {\n // taken from https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\n function gen() {\n return 'xxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n let r = (Math.random() * 16) | 0\n let v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n }\n\n // force the uuid to start with a letter\n function getPrefix() {\n let validPrefix = 'abcdef'\n return validPrefix.charAt(Math.floor(Math.random() * validPrefix.length))\n }\n\n return getPrefix() + gen()\n}\n\nexport default {\n isRuntime,\n getRuntime,\n isOnNode,\n generateId,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module metamodel\n * @requires db\n * @requires log\n * @requires component\n * @requires workflow\n * @requires helper\n * @requires mson\n * @description This module manages System Runtime metamodel.\n * System Runtime metamodel loads schemas and types, analyzes them and\n * creates the component classes and related DatabaseCollections.\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\nimport $component from './component.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n}\n\n/* Private methods */\n\n/**\n * @method isInternalName\n * @param {String} name\n * @private\n * @description is name an internal name\n */\nfunction isInternalName(name) {\n let result = true\n\n if ($mson.INTERNAL_NAMES.indexOf(name) === -1) {\n result = false\n }\n return result\n}\n\n/**\n * @method generateModels\n * @private\n * @description Generate the models\n */\nfunction generateModels() {\n let att = ''\n let name = ''\n let schemaName = ''\n let schema = {}\n let schemaDef = null\n let modelName = ''\n let modelParent = null\n let modelExt = null\n let modelDef = null\n let model = {}\n let mergedModel = {}\n let parents = []\n let length = 0\n let i = 0\n let j = 0\n let nbAncestors = 0\n let sortInheritTree = []\n\n // default values\n for (schemaName in store.generatedSchemas) {\n schema = store.generatedSchemas[schemaName]\n\n // set model internal properties\n model = {\n _name: schema[$mson.NAME],\n }\n\n // set _core\n if (typeof schema[$mson.CORE] !== 'undefined') {\n model[$mson.CORE] = schema[$mson.CORE]\n }\n\n // set inherit\n if (Array.isArray(schema[$mson.INHERIT])) {\n model[$mson.INHERIT] = schema[$mson.INHERIT]\n }\n\n // set class\n if (typeof schema[$mson.CLASS] !== 'undefined') {\n model[$mson.CLASS] = schema[$mson.CLASS]\n }\n\n // set description\n if (typeof schema[$mson.DESCRIPTION] !== 'undefined') {\n model[$mson.DESCRIPTION] = schema[$mson.DESCRIPTION]\n }\n\n // check valid name\n for (att in schema) {\n if (!isInternalName(att) && att.indexOf('_') === 0) {\n $log.invalidSchemaPropertyName(schema[$mson.NAME], att)\n }\n }\n\n // set model default values\n for (att in schema) {\n switch (true) {\n case schema[att] === 'property':\n model[att] = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'link':\n model[att] = {\n type: '_Component',\n readOnly: false,\n mandatory: false,\n default: '',\n description: att,\n label: att,\n }\n break\n case schema[att] === 'method':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n result: 'any',\n description: att,\n }\n break\n case schema[att] === 'event':\n model[att] = {\n params: [\n {\n name: 'param1',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param2',\n type: 'any',\n mandatory: false,\n default: null,\n },\n {\n name: 'param3',\n type: 'any',\n mandatory: false,\n default: null,\n },\n ],\n description: att,\n }\n break\n case schema[att] === 'collection':\n model[att] = {\n type: ['_Component'],\n readOnly: false,\n mandatory: false,\n default: [],\n description: att,\n label: att,\n }\n break\n default:\n if (!isInternalName(att)) {\n $log.invalidSchemaProperty(schema[$mson.NAME], att)\n }\n break\n }\n }\n\n store.generatedModels[model[$mson.NAME]] = model\n }\n\n // models to override\n for (modelName in store.generatedModels) {\n model = store.generatedModels[modelName]\n name = model[$mson.NAME]\n modelExt = store.models[name]\n if (modelExt) {\n mergedModel = merge(modelExt, model)\n store.generatedModels[name] = mergedModel\n }\n }\n\n // inheritance\n sortInheritTree = sortInheritanceTree()\n\n nbAncestors = sortInheritTree.length\n for (i = 0; i < nbAncestors; i++) {\n modelName = sortInheritTree[i]\n model = store.generatedModels[modelName]\n\n if (model) {\n parents = getParents(modelName)\n parents.reverse()\n\n length = parents.length\n for (j = 0; j < length; j++) {\n name = parents[j]\n modelParent = store.generatedModels[name]\n if (modelParent) {\n mergedModel = merge(modelParent, model)\n store.generatedModels[modelName] = mergedModel\n }\n }\n\n // last inherit\n // is the overriden model\n modelExt = store.models[modelName]\n if (modelExt) {\n mergedModel = merge(modelExt, store.generatedModels[modelName])\n store.generatedModels[modelName] = mergedModel\n }\n }\n }\n\n // save\n for (schemaName in store.generatedSchemas) {\n schemaDef = store.generatedSchemas[schemaName]\n $db.collections._GeneratedSchema.insert(schemaDef)\n }\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n $db.collections._GeneratedModel.insert(modelDef)\n }\n}\n\n/**\n * @method loadInMemory\n * @private\n * @description Load schemas and types in memory\n */\nfunction loadInMemory() {\n let schemas = []\n let types = []\n let schema = null\n let model = {}\n let models = []\n let type = null\n let name = ''\n let inherit = ''\n let i = 0\n let length = 0\n\n // init store\n store.inheritance = {}\n store.inheritanceTree = {}\n store.schemas = {}\n store.generatedSchemas = {}\n store.models = {}\n store.generatedModels = {}\n store.states = {}\n store.type = {}\n\n // load schemas\n schemas = $db.collections._Schema.find({})\n\n length = schemas.length\n for (i = 0; i < length; i++) {\n schema = schemas[i]\n\n name = schema[$mson.NAME]\n inherit = schema[$mson.INHERIT]\n\n store.schemas[name] = schema\n if (inherit) {\n store.inheritance[name] = inherit\n }\n\n if (!schema[$mson.CORE]) {\n $log.loadSchema(name)\n }\n }\n\n // load models\n models = $db.collections._Model.find({})\n\n length = models.length\n for (i = 0; i < length; i++) {\n model = models[i]\n name = model[$mson.NAME]\n\n store.models[name] = model\n\n if (!model[$mson.CORE]) {\n $log.loadModel(name)\n }\n }\n\n // load types\n types = $db.collections._Type.find({})\n\n length = types.length\n for (i = 0; i < length; i++) {\n type = types[i]\n store.type[type.name] = type\n\n if (!type.core) {\n $log.loadType(type.name)\n }\n }\n}\n\n/**\n * @method createInheritanceTree\n * @private\n * @description Create the inheritance tree\n */\nfunction createInheritanceTree() {\n let name = ''\n let c3linerization = []\n let ancestors = []\n\n /**\n *\n * @param {Array} elts array of elts\n * @returns {Boolean} true if all the arrays are empty\n * @private\n * @description Check if we have finisehd to linerize\n */\n function _isEmpty(elts) {\n let i = 0\n let length = 0\n let result = true\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].length) {\n result = false\n }\n }\n return result\n }\n\n /**\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @private\n * @description Remove an elt from all the arrays\n */\n function _removeCandidate(elt, elts) {\n let i = 0\n let length = 0\n let arr = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) === 0) {\n arr = elts[i]\n arr.reverse()\n arr.pop()\n arr.reverse()\n elts[i] = arr\n }\n }\n }\n\n /**\n * @method _isCandidate\n * @param {String} elt element to remove\n * @param {Array} elts array of elts\n * @returns {Boolean} true if the element is a good candidate.\n * @private\n * @description Check the element is a good candidate\n */\n function _isCandidate(elt, elts) {\n let result = true\n let i = 0\n let length = 0\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (elts[i].indexOf(elt) > 0) {\n result = false\n }\n }\n\n return result\n }\n\n /**\n * @method _findCandidate\n * @param {Array} elts array of elts\n * @returns {Array} array containing the candidate\n * @private\n * @description Find a candidate and return it.\n */\n function _findCandidate(elts) {\n let i = 0\n let length = 0\n let result = []\n\n length = elts.length\n for (i = 0; i < length; i++) {\n if (_isCandidate(elts[i][0], elts)) {\n result.push(elts[i][0])\n _removeCandidate(elts[i][0], elts)\n break\n }\n }\n return result\n }\n\n /**\n * @method _merge\n * @param {Array} elts array of elts\n * @returns {Array} list of candidates returned by the merge\n * @private\n * @description Merge the arrays\n */\n function _merge(elts) {\n let result = []\n let candidates = []\n\n candidates = _findCandidate(elts)\n while (candidates[0] !== undefined) {\n result = result.concat(candidates)\n candidates = _findCandidate(elts)\n }\n\n if (!_isEmpty(elts)) {\n $log.cyclicDependency()\n }\n return result\n }\n\n /**\n * @method _linerize\n * @param {String} name name of the element\n * @returns {Array} list of candidates\n * @private\n * @description Start the linerieation from an element\n */\n function _linerize(name) {\n let result = []\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _checkCyclicDep\n * @param {String} name\n * @param {String} item\n * @returns {Boolean} true if there is a cyclic dependency\n * @private\n * @description Check if there is a cyclic dependency\n */\n function _checkCyclicDep(name, item) {\n let isCyclicDeb = false\n\n if (\n Array.isArray(store.inheritance[item]) &&\n store.inheritance[item].indexOf(name) !== -1\n ) {\n $log.cyclicDependency(name)\n isCyclicDeb = true\n }\n return isCyclicDeb\n }\n\n if (Array.isArray(store.inheritance[name])) {\n parents = store.inheritance[name].slice()\n } else {\n $log.missingSchema(name)\n }\n\n length = parents.length\n for (i = 0; i < length; i++) {\n if (_checkCyclicDep(name, parents[i])) {\n parents = []\n break\n }\n }\n\n if (parents.length) {\n result = [name].concat(_merge(parents.map(_linerize).concat([parents])))\n } else {\n result = [name]\n }\n return result\n }\n\n for (name in store.inheritance) {\n c3linerization = _linerize(name)\n ancestors = c3linerization.reverse()\n ancestors.pop()\n if (ancestors.length) {\n store.inheritanceTree[name] = ancestors\n }\n }\n}\n\n/**\n * @method extend\n * @param {String} name name of the schema to extend\n * @returns {JSON} object extended with the properties of its parent\n * @private\n * @description Extend a schema with the properties of its parent\n */\nfunction extend(name) {\n let sonExtend = {}\n let son = store.schemas[name]\n let ancestors = store.inheritanceTree[name]\n let length = 0\n let i = 0\n let ancestor = null\n let prop = ''\n\n if (ancestors) {\n length = ancestors.length\n ancestors.reverse()\n }\n for (i = 0; i < length; i++) {\n ancestor = store.schemas[ancestors[i]]\n for (prop in ancestor) {\n if (prop.indexOf('_') !== 0) {\n sonExtend[prop] = ancestor[prop]\n }\n }\n }\n for (prop in son) {\n sonExtend[prop] = son[prop]\n }\n return sonExtend\n}\n\n/**\n * @method sortInheritanceTree\n * @returns {Array} sorted InheritanceTree structure\n * @private\n * @description Get sorted InheritanceTree structure\n */\nfunction sortInheritanceTree() {\n let result = []\n let temp = {}\n let keys = []\n let modelName = ''\n let nbAncestors = 0\n\n for (modelName in store.inheritanceTree) {\n nbAncestors = store.inheritanceTree[modelName].length\n if (typeof temp[nbAncestors] === 'undefined') {\n temp[nbAncestors] = []\n }\n temp[nbAncestors].push(modelName)\n }\n\n keys = Object.keys(temp).sort()\n keys.forEach(function (index) {\n temp[index].forEach(function (model) {\n result.push(model)\n })\n })\n\n return result\n}\n\n/**\n * @method generateSchemas\n * @private\n * @description Generate the schemas\n */\nfunction generateSchemas() {\n let name = ''\n\n for (name in store.schemas) {\n if (!store.schemas[name][$mson.CORE]) {\n $log.generatingSchema(name)\n }\n\n store.generatedSchemas[name] = extend(name)\n }\n}\n\n/**\n * @method checkModels\n * @private\n * @description Test if all the models are compliants with their schemas\n */\nfunction checkModels() {\n let name = ''\n let classDef = null\n let schema = ''\n\n for (name in store.generatedModels) {\n classDef = store.generatedModels[name]\n if (classDef) {\n schema = store.generatedSchemas[name]\n if (schema) {\n if (!classDef[$mson.CORE]) {\n $log.checkModel(name)\n }\n checkImp(classDef, schema)\n } else {\n $log.missingImplementation(name)\n }\n }\n }\n}\n\n/**\n * @method getStates\n * @private\n * @description Get all the states of a schema\n */\nfunction getStates() {\n let name = ''\n let schema = null\n let type = ''\n let states = []\n let attribute = ''\n\n for (name in store.generatedSchemas) {\n states = []\n schema = store.generatedSchemas[name]\n if (schema) {\n for (attribute in schema) {\n type = schema[attribute]\n if (\n attribute.indexOf('_') !== 0 &&\n $mson.INTERNAL_TYPES.indexOf(type) !== -1\n ) {\n states.push(attribute)\n }\n }\n }\n store.states[name] = states\n }\n}\n\n/**\n * @method checkImp\n * @param {JSON} classDef schema to test\n * @param {JSON} classImp schema to validate\n * @private\n * @description Test if a schema is compliant with its schema\n */\nfunction checkImp(classDef, classImp) {\n let property = ''\n let value = null\n\n for (property in classImp) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classDef[property] !== 'undefined') {\n value = classDef[property]\n if (!checkSchema(value, classImp[property])) {\n $log.invalidTypeImp(property, classDef[$mson.NAME])\n }\n } else {\n $log.missingPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n // check if all properties are there\n for (property in classDef) {\n if (\n property !== $mson.ID &&\n property !== $mson.NAME &&\n property !== $mson.DESCRIPTION &&\n property !== $mson.INHERIT &&\n property !== $mson.CLASS &&\n property !== $mson.CORE\n ) {\n if (typeof classImp[property] === 'undefined') {\n $log.unknownPropertyImp(property, classDef[$mson.NAME])\n }\n }\n }\n}\n\n/**\n * @method checkSchema\n * @param {Object} value value to test\n * @param {Object} type type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has the correct type\n */\nfunction checkSchema(value, type) {\n let result = true\n\n if (hasType(type, 'string') && $mson.DEFAULT_TYPES.indexOf(type) !== -1) {\n result = hasType(value, type)\n } else {\n result = checkCustomSchema(value, type)\n }\n return result\n}\n\n/**\n * @method checkCustomSchema\n * @param {type} value value to test\n * @param {String} typeName type to test\n * @returns {Boolean} true if the value has the correct type\n * @private\n * @description Test if a value has correct custom type\n */\nfunction checkCustomSchema(value, typeName) {\n let result = true\n let typeDef = store.type[typeName]\n let length = 0\n let i = 0\n\n if (!hasType(typeDef, 'undefined')) {\n if (!hasType(value, 'undefined')) {\n if (typeDef.type === 'array') {\n length = value.length\n for (i = 0; i < length; i++) {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value[i], typeDef.schema)\n } else {\n result = isValidType(value[i], typeDef.type)\n }\n if (result === false) {\n break\n }\n }\n } else {\n if (!hasType(typeDef.schema, 'undefined')) {\n result = isValidSchema(value, typeDef.schema)\n } else {\n result = isValidType(value, typeDef.type)\n }\n }\n } else {\n result = false\n }\n } else {\n result = false\n }\n\n return result\n}\n\n/**\n * @method initDbStructure\n * @private\n * @description Init the Database stucture\n */\nfunction initDbStructure() {\n $db.collection('_Logger')\n $db.collection('_Schema')\n $db.collection('_GeneratedSchema')\n $db.collection('_Model')\n $db.collection('_GeneratedModel')\n $db.collection('_Behavior')\n $db.collection('_Type')\n $db.collection('_Message')\n $db.collection('_Channel')\n $db.collection('_History')\n}\n\n/**\n * @method createDbStructure\n * @private\n * @description Create the Database structure (i.e. DatabaseCollection)\n */\nfunction createDbStructure() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (\n typeof $db.collections[modelDef[$mson.NAME]] === 'undefined' &&\n modelDef[$mson.CLASS] !== false\n ) {\n $db.collection(modelDef[$mson.NAME])\n }\n }\n}\n\n/**\n * @method createClass\n * @private\n * @description Create all the classes of the model\n */\nfunction createClass() {\n let modelName = ''\n let modelDef = {}\n\n for (modelName in store.generatedModels) {\n modelDef = store.generatedModels[modelName]\n if (modelDef[$mson.CLASS] !== false) {\n $component.create({\n model: modelName,\n })\n if (!modelDef[$mson.CORE]) {\n $log.createClass(modelName)\n }\n }\n }\n}\n\n/**\n * @method getRealClassName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced class\n */\nfunction getRealClassName(value) {\n return value.trim()\n}\n\n/**\n * @method getRealTypeName\n * @param {String} value\n * @returns {String} real name\n * @private\n * @description Get the real name of the referenced type\n */\nfunction getRealTypeName(value) {\n return value.replace('{', '').replace('}', '').trim()\n}\n\n/**\n * @method isCustomType\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a custom type\n */\nfunction isCustomType(value) {\n let result =\n hasType(value, 'string') &&\n $mson.DEFAULT_TYPES.indexOf(value) === -1 &&\n !isClassName(value)\n\n return result\n}\n\n/**\n * @method isTypeReference\n * @param {String} value\n * @returns {Boolean}\n * @description Is the value reference a type value\n */\nfunction isTypeReference(value) {\n return value.indexOf('{') !== -1\n}\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getRealType\n * @param {type} value\n * @returns {String} type of the value\n * @private\n * @description Get the real type of a value\n */\nfunction getRealType(value) {\n let type = ''\n\n if (Array.isArray(value)) {\n type = 'array'\n } else {\n type = typeof value\n }\n if (value === 'any') {\n type = 'any'\n }\n\n return type\n}\n\n/**\n * @method getClassName\n * @param {type} obj object\n * @returns {String} the class name of the object\n * @private\n * @description Get the class name of an object\n */\nfunction getClassName(obj) {\n let result = ''\n\n if (obj && obj.constructor) {\n result = obj.constructor.name\n } else {\n result = typeof obj\n }\n return result\n}\n\n/**\n * @method isValidEnumValue\n * @param {String} value\n * @param {Array} enumValue\n * @returns {Boolean} the class name of the object\n * @private\n * @description Check if the value is a valid enum value\n */\nfunction isValidEnumValue(value, enumValue) {\n return enumValue.indexOf(value) !== -1\n}\n\n/**\n * @param {type} value\n * @param {type} type\n * @returns {Boolean} true is value has type 'type'\n * @description Check if a value has the specified type\n */\nfunction hasType(value, type) {\n let result = true\n let date = null\n\n switch (type) {\n case 'array':\n result = Array.isArray(value)\n break\n case 'date':\n if (typeof value === 'string') {\n date = new Date(value)\n result = !isNaN(date.getDate())\n } else {\n result = value instanceof Date\n }\n break\n case 'any':\n result = true\n break\n default:\n result = type === typeof value\n break\n }\n\n return result\n}\n\n/**\n * @method checkType\n * @param {String} name\n * @param {String} id component id\n * @param {String} type type to check\n * @returns {Boolean} true if the attribute has for type type\n * @description Check if an attribute of the schema has a specific type\n */\nfunction checkType(name, id, type) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let attributeType = ''\n\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedSchemas[componentSchema[$mson.NAME]]\n }\n\n if (componentSchema) {\n attributeType = componentSchema[name.split('.')[0]]\n if (attributeType === type) {\n result = true\n }\n }\n\n return result\n}\n\n/**\n * @method merge\n * @param {Object} source source schema\n * @param {Object} target target schema\n * @returns {Object} merged schema\n * @description Merge two schemas\n */\nfunction merge(source, target) {\n let propName = ''\n let result = target\n\n for (propName in source) {\n if (source.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n result[propName] = source[propName]\n }\n }\n return result\n}\n\n/**\n * @method initConfiguration\n * @param {String} name name of the object to configure\n * @param {String} type type of the object to configure\n * @param {Boolean} isMethod is a method\n * @returns {Object} a configuration\n * @description Init a configuration depending of the context\n */\nfunction initConfiguration(name, type, isMethod) {\n let result = null\n let typeDef = []\n let schemaDef = []\n let defaultValue = ''\n\n switch (true) {\n case name === '=>':\n break\n case typeof type === 'string' && type === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: 'boolean',\n mandatory: false,\n default: false,\n }\n } else {\n result = {\n type: 'boolean',\n readOnly: false,\n mandatory: false,\n default: false,\n }\n }\n break\n case typeof type === 'string' && type === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: 'string',\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: 'string',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case typeof type === 'string' && type === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: 'number',\n mandatory: false,\n default: 0,\n }\n } else {\n result = {\n type: 'number',\n readOnly: false,\n mandatory: false,\n default: 0,\n }\n }\n break\n case typeof type === 'string' && type === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: 'object',\n mandatory: false,\n default: {},\n }\n } else {\n result = {\n type: 'object',\n readOnly: false,\n mandatory: false,\n default: {},\n }\n }\n break\n case typeof type === 'string' && type === 'array':\n if (isMethod) {\n result = {\n name: name,\n type: 'array',\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: 'array',\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case typeof type === 'string' && type === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: 'date',\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n } else {\n result = {\n type: 'date',\n readOnly: false,\n mandatory: false,\n default: '1970-01-01T00:00:00.000Z',\n }\n }\n break\n case typeof type === 'string' && type === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: 'any',\n mandatory: false,\n default: null,\n }\n } else {\n result = {\n type: 'any',\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n // link / custom type\n case typeof type === 'string':\n defaultValue = {}\n\n // case of enumeration\n typeDef = $db.collections._Type.find({\n name: type,\n })\n if (typeDef.length) {\n if (typeDef[0].value) {\n defaultValue = typeDef[0].value[0]\n }\n }\n\n // case of link\n schemaDef = $db.collections._Schema.find({\n _name: type,\n })\n if (schemaDef.length) {\n defaultValue = ''\n }\n\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: defaultValue,\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: defaultValue,\n }\n }\n break\n case Array.isArray(type) && type[0] === 'boolean':\n if (isMethod) {\n result = {\n name: name,\n type: ['boolean'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['boolean'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'string':\n if (isMethod) {\n result = {\n name: name,\n type: ['string'],\n mandatory: false,\n default: '',\n }\n } else {\n result = {\n type: ['string'],\n readOnly: false,\n mandatory: false,\n default: '',\n }\n }\n break\n case Array.isArray(type) && type[0] === 'number':\n if (isMethod) {\n result = {\n name: name,\n type: ['number'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['number'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'object':\n if (isMethod) {\n result = {\n name: name,\n type: ['object'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['object'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'date':\n if (isMethod) {\n result = {\n name: name,\n type: ['date'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['date'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type) && type[0] === 'any':\n if (isMethod) {\n result = {\n name: name,\n type: ['any'],\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: ['any'],\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n case Array.isArray(type):\n if (isMethod) {\n result = {\n name: name,\n type: type,\n mandatory: false,\n default: [],\n }\n } else {\n result = {\n type: type,\n readOnly: false,\n mandatory: false,\n default: [],\n }\n }\n break\n default:\n break\n }\n\n return result\n}\n\n/**\n * @method generateConfiguration\n * @param {JSON} model definition of the model\n * @returns {Object} generated model\n * @description Create a full model definition from a model\n */\nfunction generateConfiguration(model) {\n let propName = ''\n let paramPropName = ''\n let methodConf = {}\n\n model = JSON.parse(JSON.stringify(model))\n\n for (propName in model) {\n if (model.hasOwnProperty(propName) && propName.indexOf('_') !== 0) {\n switch (true) {\n // property type\n case typeof model[propName] === 'string' ||\n Array.isArray(model[propName]):\n model[propName] = initConfiguration(propName, model[propName], false)\n break\n\n // property configuration\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] === 'undefined':\n model[propName] = merge(\n model[propName],\n initConfiguration(propName, model[propName].type || 'any')\n )\n break\n\n // method / event\n case typeof model[propName] === 'object' &&\n typeof model[propName]['=>'] !== 'undefined':\n methodConf = {\n params: [],\n result: 'any',\n }\n\n for (paramPropName in model[propName]) {\n // parameter type\n if (typeof model[propName][paramPropName] === 'string') {\n if (paramPropName === '=>') {\n methodConf.result = model[propName][paramPropName]\n } else {\n methodConf.params.push(\n initConfiguration(\n paramPropName,\n model[propName][paramPropName],\n true\n )\n )\n }\n }\n // parameter configuration\n if (typeof model[propName][paramPropName] === 'object') {\n methodConf.params.push(\n merge(model[propName][paramPropName]),\n initConfiguration(\n paramPropName,\n model[propName][paramPropName].type || 'any'\n )\n )\n }\n }\n model[propName] = methodConf\n break\n default:\n break\n }\n }\n }\n return model\n}\n\n/* Public methods */\n\n/**\n * @method schema\n * @param {String} name name of the schema\n * @param {JSON} schema definition of the schema\n * @returns {String} id of the schema\n * @description Add a new schema to the metamodel\n */\nfunction schema(name, schema) {\n let id = null\n let result = []\n let schemaName = ''\n let mergedSchema = {}\n let schemas = []\n\n if (typeof schema === 'undefined' || Object.keys(schema).length === 0) {\n if (typeof name === 'string') {\n schema = {}\n schema[$mson.NAME] = name\n schemaName = name\n } else {\n schema = JSON.parse(JSON.stringify(name))\n schemaName = schema[$mson.NAME]\n }\n } else {\n schema = JSON.parse(JSON.stringify(schema))\n schema[$mson.NAME] = name\n schemaName = schema[$mson.NAME]\n }\n\n if (typeof schema[$mson.ID] === 'undefined') {\n schema[$mson.ID] = $helper.generateId()\n }\n if (typeof schema[$mson.INHERIT] === 'undefined') {\n schema[$mson.INHERIT] = ['_Component']\n }\n\n /**\n * @method _removeDuplicate\n * @param {Array} inherits list of parents\n * @private\n * @description remove duplicate parents in the list of parents\n */\n function _removeDuplicate(inherits) {\n let filteredList = []\n let list = {}\n\n inherits.forEach(function (name) {\n let cleanName = name.trim()\n if (typeof list[cleanName] === 'undefined') {\n list[cleanName] = cleanName\n filteredList.push(cleanName)\n }\n })\n\n return filteredList\n }\n\n schema[$mson.INHERIT] = _removeDuplicate(schema[$mson.INHERIT])\n\n // check if schema is compliant with the meta meta model\n if (isValidObject(schema, $mson.SCHEMA_DEFINITION, false)) {\n schemas = $db.collections._Schema.find({\n _name: schemaName,\n })\n if (schemas.length) {\n mergedSchema = merge(schema, schemas[0])\n $db.collections._Schema.update(\n {\n _name: schemaName,\n },\n mergedSchema\n )\n id = schemas[0][$mson.ID]\n } else {\n result = $db.collections._Schema.insert(schema)\n id = result[0]\n }\n } else {\n $log.invalidSchema(schema[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method model\n * @param {String} name name of the model\n * @param {JSON} model definition of the model\n * @returns {String} id of the model\n * @description Add a new model to the metamodel\n */\nfunction model(name, model) {\n let id = null\n let result = []\n let modelName = ''\n let mergedModel = {}\n let models = []\n\n if (typeof model === 'undefined' || Object.keys(model).length === 0) {\n model = JSON.parse(JSON.stringify(name))\n modelName = model[$mson.NAME]\n } else {\n model = JSON.parse(JSON.stringify(model))\n model[$mson.NAME] = name\n model = generateConfiguration(model)\n modelName = model[$mson.NAME]\n }\n\n if (typeof model[$mson.ID] === 'undefined') {\n model[$mson.ID] = $helper.generateId()\n }\n\n // check if model is compliant with the meta meta model\n if (isValidObject(model, $mson.MODEL_DEFINITION, false)) {\n models = $db.collections._Model.find({\n _name: modelName,\n })\n if (models.length) {\n mergedModel = merge(model, models[0])\n $db.collections._Model.update(\n {\n _name: modelName,\n },\n mergedModel\n )\n id = models[0][$mson.ID]\n } else {\n result = $db.collections._Model.insert(model)\n id = result[0]\n }\n } else {\n $log.invalidModel(model[$mson.NAME])\n }\n\n return id\n}\n\n/**\n * @method type\n * @param {String} name name of the type\n * @param {JSON} type type to add\n * @returns {String} id of the type\n * @description Add a new type\n */\nfunction type(name, type) {\n let id = null\n let result = []\n let typeName = ''\n let typeDef = {}\n\n if (typeof type === 'undefined' || Object.keys(type).length === 0) {\n typeDef = JSON.parse(JSON.stringify(name))\n typeName = typeDef.name\n } else {\n if (Array.isArray(type)) {\n type = JSON.parse(JSON.stringify(type))\n typeDef.value = type\n typeDef.name = name\n typeDef.type = typeof type[0] || 'any'\n typeName = typeDef.name\n } else {\n type = JSON.parse(JSON.stringify(type))\n typeDef.schema = generateConfiguration(type)\n typeDef.name = name\n typeDef.type = 'object'\n typeName = typeDef.name\n }\n }\n\n if (typeof typeDef[$mson.ID] === 'undefined') {\n typeDef[$mson.ID] = $helper.generateId()\n }\n\n // check if type is compliant with the meta meta model\n if (isValidObject(typeDef, $mson.TYPE_DEFINITION)) {\n result = $db.collections._Type.insert(typeDef)\n id = result[0]\n } else {\n $log.invalidTypeDefinition(typeName)\n }\n\n return id\n}\n\n/**\n * @method init\n * @description Init the metamodel\n */\nfunction init() {\n clear()\n initDbStructure()\n}\n\n/**\n * @method clear\n * @description Remove the data of the metamodel from the memory\n */\nfunction clear() {\n store = {\n inheritance: {},\n inheritanceTree: {},\n schemas: {},\n generatedSchemas: {},\n models: {},\n generatedModels: {},\n states: {},\n type: {},\n }\n}\n\n/**\n * @method create\n * @description Create the metamodel\n */\nfunction create() {\n loadInMemory()\n createInheritanceTree()\n generateSchemas()\n generateModels()\n checkModels()\n getStates()\n createDbStructure()\n createClass()\n}\n\n/**\n * @method isEvent\n * @param {String} name\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is an event\n * @description Check if an attribute of the schema is an event\n */\nfunction isEvent(name, id) {\n return checkType(name, id, $mson.EVENT_TYPE)\n}\n\n/**\n * @method isProperty\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a property\n * @description Check if an attribute of the schema is a property\n */\nfunction isProperty(name, id) {\n return checkType(name, id, $mson.PROPERTY_TYPE)\n}\n\n/**\n * @method isLink\n * @param {String} name name of the property\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a link\n * @description Check if an attribute of the schema is a link\n */\nfunction isLink(name, id) {\n return checkType(name, id, $mson.LINK_TYPE)\n}\n\n/**\n * @method isCollection\n * @param {String} name name of the collection\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a collection\n * @description Check if an attribute of the schema is a collection\n */\nfunction isCollection(name, id) {\n return checkType(name, id, $mson.COLLECTION_TYPE)\n}\n\n/**\n * @method isMethod\n * @param {String} name name of the method\n * @param {String} id component id\n * @returns {Boolean} true if the attribute is a method\n * @description Check if an attribute of the schema is a method\n */\nfunction isMethod(name, id) {\n return checkType(name, id, $mson.METHOD_TYPE)\n}\n\n/**\n * @method isStructure\n * @param {String} path path of the property\n * @param {String} modelName model name\n * @returns {Boolean} true if the property is a structure\n * @description Check if an attribute of the schema is a structure\n */\nfunction isStructure(path, modelName) {\n let result = false\n let structure = null\n let type = ''\n\n type = getModelPathType(modelName, path)\n\n if (Array.isArray(structure)) {\n structure = getType(type[0])\n } else {\n structure = getType(type)\n }\n\n if (structure && structure.schema) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isValidState\n * @param {String} name name of the state\n * @param {String} id component id\n * @returns {Boolean} true if the name is a correct state for the component\n * @description Check if the name is a correct state for the component\n */\nfunction isValidState(name, id) {\n let result = false\n let componentSchema = store.generatedModels[id]\n let state = {}\n\n if (isModelPath(name)) {\n result = isValidModelPath(id, name)\n } else {\n if (componentSchema && componentSchema[$mson.NAME]) {\n componentSchema = store.generatedModels[componentSchema[$mson.NAME]]\n }\n state = store.states[componentSchema[$mson.NAME]]\n\n if (Array.isArray(state)) {\n result = state.indexOf(name) !== -1\n }\n }\n\n return result\n}\n\n/**\n * @method isValidType\n * @param {Object} value value to validate\n * @param {String} type type to use for validation\n * @param {Boolean} isDocument is the value from a document\n * @returns {Boolean} true if the object is compliant with the type\n * @description Check if a value is compliant with a type\n */\nfunction isValidType(value, typeName, isDocument) {\n let result = true\n\n /**\n * @method _isValidCustomType\n * @param {String} value\n * @param {String} typeName\n * @private\n * @description Check if a value has the correct type\n */\n function _isValidCustomType(value, typeName) {\n let typeDef = store.type[typeName]\n let result = true\n\n if (Array.isArray(typeDef.value) && typeDef.value.indexOf(value) === -1) {\n result = false\n }\n\n if (result === false) {\n $log.invalidEnumValue(value, typeName)\n }\n return result\n }\n\n /**\n * @method _isValidType\n * @param {String} value\n * @param {String} typeName\n * @param {Boolean} isDocument is the value to validate from a document\n * @returns {Boolean} the object is compliant with the type\n * @private\n * @description Check if an object is compliant with a type\n */\n function _isValidType(value, typeName, isDocument) {\n let isValid = true\n let realType = ''\n let i = 0\n let length = 0\n\n realType = getRealType(typeName)\n switch (realType) {\n case 'string':\n isValid = hasType(value, typeName)\n break\n case 'array':\n if (Array.isArray(value)) {\n length = value.length\n for (i = 0; i < length; i++) {\n switch (true) {\n case isCustomType(typeName[0]):\n isValid = checkCustomSchema(value[i], typeName[0])\n break\n case isClassName(typeName[0]):\n if (!isDocument) {\n if (\n value[i] !== '' &&\n value[i] !== null &&\n typeof value[i] !== 'string'\n ) {\n isValid = inheritFrom(getClassName(value[i]), typeName[0])\n }\n } else {\n isValid = false\n }\n break\n default:\n isValid = hasType(value[i], typeName[0])\n break\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n switch (true) {\n case isCustomType(typeName):\n result = checkCustomSchema(value, typeName)\n\n if (!result) {\n if (store.type[typeName]) {\n $log.invalidEnumType(value, typeName, store.type[typeName].type)\n } else {\n $log.invalidEnumType(value, typeName)\n }\n }\n\n if (result) {\n result = _isValidCustomType(value, typeName)\n }\n break\n case isClassName(typeName):\n if (!isDocument) {\n if (value !== null && typeof value !== 'string') {\n result = inheritFrom(getClassName(value), typeName)\n } else {\n if (value !== null) {\n result = false\n }\n }\n }\n break\n default:\n result = _isValidType(value, typeName, isDocument)\n break\n }\n\n return result\n}\n\n/**\n * @method isValidEnum\n * @param {String|Object} value value to validate\n * @param {Schema} schema schema to use for validation\n * @returns {Boolean} true if the object is compliant with the enum\n * @description Check if a value is compliant with a type enum.\n */\nfunction isValidEnum(value, schema) {\n let result = true\n\n /**\n * @method _isInstanceOf\n * @param {String} component\n * @param {String} className\n * @private Check if the component has for class name className\n */\n function _isInstanceOf(component, className) {\n let result = false\n let componentClassName = ''\n\n componentClassName = component.constructor.name\n\n if (componentClassName === 'Function') {\n componentClassName = component.name\n }\n result = componentClassName === className\n\n return result\n }\n\n if (isClassName(schema.type)) {\n result =\n _isInstanceOf($component.get(value), getRealClassName(schema.type)) &&\n schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.type)\n }\n } else {\n result = hasType(value, schema.type) && schema.value.indexOf(value) !== -1\n if (!result) {\n $log.invalidEnumValue(value, schema.name)\n }\n }\n\n return result\n}\n\n/**\n * @method isValidSchema\n * @param {JSON} object\n * @param {JSON} schema\n * @returns {Boolean}\n * @description Check if the object is compliant with the schema.\n * Use it to test if a schema is compliant with a schema\n * it is supposed to validate.\n */\nfunction isValidSchema(object, schema) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n /**\n * @method _isValidClassName\n * @returns {Boolean} the field is compliant with the type of the class\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName() {\n let isValid = true\n let enumValue = []\n\n typeRef = getClassName(typeSchema)\n typeRef = object[typeRef]\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidTypeReference\n * @returns {Boolean} the field is compliant with the type of the references type\n * @private\n * @description Check if a field is compliant with the type of the references type\n */\n function _isValidTypeReference() {\n let isValid = true\n let enumValue = []\n\n typeRef = getRealTypeName(typeSchema)\n typeRef = object[typeRef]\n\n switch (true) {\n case typeof typeRef === 'string':\n if (isCustomType(typeRef)) {\n if (store.type[typeRef]) {\n if (store.type[typeRef].schema) {\n isValid = isValidSchema(field, store.type[typeRef].schema)\n } else {\n // check type\n isValid = hasType(field, store.type[typeRef].type)\n\n // check value\n enumValue = store.type[typeRef].value\n if (enumValue) {\n isValid = isValidEnumValue(field, enumValue)\n }\n }\n } else {\n isValid = false\n }\n } else {\n if (typeRef === 'array') {\n isValid = Array.isArray(field)\n } else {\n if (isClassName(typeRef)) {\n isValid = hasType(field, 'object') || hasType(field, 'string')\n // TODO maybe have a more strict validation than just a type checking\n } else {\n isValid = hasType(field, typeRef)\n }\n }\n }\n break\n\n case Array.isArray(typeRef):\n if (!Array.isArray(field)) {\n isValid = false\n }\n break\n\n default:\n isValid = false\n break\n }\n\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeRef, field)\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType() {\n let isValid = true\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidSchema(field, typeSchema)\n } else {\n if (!hasType(field, typeSchema)) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n for (i = 0; i < length; i++) {\n if (isCustomType(typeSchema[0])) {\n isValid = isValidSchema(\n field[i],\n store.type[typeSchema[0]].schema\n )\n } else {\n if (!hasType(field[i], typeSchema[0])) {\n $log.invalidPropertyType(fieldName, typeSchema[0], field[i])\n isValid = false\n break\n }\n }\n }\n } else {\n isValid = false\n }\n break\n default:\n break\n }\n return isValid\n }\n\n // type\n if (hasType(object, 'object')) {\n for (fieldName in object) {\n field = object[fieldName]\n\n if (hasType(schema[fieldName], 'undefined')) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n typeSchema = schema[fieldName].type\n }\n\n switch (true) {\n case isClassName(typeSchema):\n result = result && _isValidClassName()\n break\n case isTypeReference(typeSchema):\n result = result && _isValidTypeReference()\n break\n default:\n result = result && _isValidType()\n break\n }\n if (!result) {\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (\n mandatory === true &&\n hasType(object[fieldName], 'undefined') &&\n object[fieldName] !== undefined\n ) {\n $log.missingProperty(fieldName)\n result = false\n break\n }\n }\n } else {\n result = false\n $log.invalidPropertyFormat(object)\n }\n\n return result\n}\n\n/**\n * @method isValidObject\n * @param {Object} object object to validate\n * @param {Object} schema schema that validates the object\n * @param {Boolean} strict true if validation is strict\n * @param {Boolean} cleanRef true if we remove the reference to the object\n * @returns {Boolean} true is the object is compliant with the schema\n * @description Check if the object is compliant with the schema.\n * Use it to test if the constructor of an object is compliant\n * with the definition of the class.\n */\nfunction isValidObject(object, schema, strict, cleanRef) {\n let fieldName = ''\n let field = null\n let result = true\n let mandatory = true\n let typeSchema = ''\n let typeRef = ''\n let realType = ''\n let length = 0\n let i = 0\n\n if (hasType(strict, 'undefined')) {\n strict = true\n }\n\n if (hasType(cleanRef, 'undefined')) {\n cleanRef = false\n }\n\n /**\n * @method _isValidCustomType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the custom type\n * @private\n * @description Check if a field is compliant with a custom type\n */\n function _isValidCustomType(field, typeSchema) {\n let isValid = true\n let realType = ''\n\n realType = store.type[typeSchema]\n if (realType) {\n switch (true) {\n case !hasType(realType.schema, 'undefined'):\n isValid = isValidObject(field, realType.schema, strict, cleanRef)\n break\n case !hasType(realType.value, 'undefined'):\n isValid = isValidEnum(field, realType)\n break\n default:\n isValid = isValidType(field, realType.type)\n break\n }\n } else {\n isValid = false\n }\n return isValid\n }\n\n /**\n * @method _isValidClassName\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type of the class name\n * @private\n * @description Check if a field is compliant with the type of the class name\n */\n function _isValidClassName(field, typeSchema) {\n let isValid = true\n let comp = null\n let isComponent = false\n\n typeRef = getRealClassName(typeSchema)\n if (field && field.id) {\n comp = field\n isComponent = true\n } else {\n comp = $component.get(field)\n }\n\n if (!hasType(comp, 'undefined')) {\n if (!inheritFrom(comp.constructor.name, typeRef)) {\n isValid = false\n $log.invalidType(fieldName, field, typeRef)\n } else {\n if (isComponent && cleanRef) {\n object[fieldName] = comp.id() // store the id instead the full object\n }\n }\n } else {\n // check for default value of an object ({} or null)\n switch (true) {\n case hasType(field, 'object') &&\n field !== null &&\n Object.keys(field).length > 0:\n case hasType(field, 'string') && field !== '':\n // uncomment line if we need this log\n // $log.canNotYetValidate(field, typeRef);\n break\n default:\n break\n }\n }\n return isValid\n }\n\n /**\n * @method _isValidType\n * @param {String} field a field\n * @param {String} typeSchema a schema\n * @returns {Boolean} the field is compliant with the type\n * @private\n * @description Check if a field is compliant with a type\n */\n function _isValidType(field, typeSchema) {\n let isValid = true\n let date = null\n let typeArray = ''\n\n realType = getRealType(typeSchema)\n switch (realType) {\n case 'any':\n break\n case 'string':\n if (isCustomType(realType)) {\n isValid = isValidObject(field, typeSchema, strict, cleanRef)\n } else {\n if (typeSchema === 'array') {\n if (getRealType(field) !== 'array') {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n } else {\n if (typeSchema === 'date') {\n date = new Date(field)\n isValid = !isNaN(date.getDate())\n if (!isValid) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n break\n }\n } else {\n if (\n getRealType(field) !== typeSchema &&\n getRealType(field) !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeSchema, field)\n isValid = false\n break\n }\n }\n }\n }\n break\n case 'array':\n if (Array.isArray(field)) {\n length = field.length\n typeArray = typeSchema[0]\n for (i = 0; i < length; i++) {\n if (isCustomType(typeArray)) {\n isValid = _isValidCustomType(field[i], typeArray)\n } else {\n if (!isClassName(typeArray)) {\n if (\n getRealType(field[i]) !== typeArray &&\n typeArray !== 'any'\n ) {\n $log.invalidPropertyType(fieldName, typeArray, field[i])\n isValid = false\n break\n }\n } else {\n if (getRealType(field[i]) === 'string') {\n // Case of an import of a system\n if ($component.get(field[i])) {\n if (\n !inheritFrom(\n getClassName($component.get(field[i])),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName($component.get(field[i]))\n )\n isValid = false\n break\n }\n } else {\n if (field[i] !== '') {\n // uncomment line if we need this log\n // $log.canNotYetValidate(\n // field[i],\n // getRealClassName(typeArray)\n // );\n }\n }\n } else {\n if (\n !inheritFrom(\n getClassName(field[i]),\n getRealClassName(typeArray)\n )\n ) {\n $log.invalidClassName(\n JSON.stringify(field[i]),\n getRealClassName(typeArray),\n getClassName(field[i])\n )\n isValid = false\n break\n } else {\n if (cleanRef) {\n field[i] = field[i].id() // store the id instead the full object\n }\n }\n }\n }\n }\n }\n } else {\n isValid = false\n $log.invalidType(fieldName, field, 'array')\n }\n break\n default:\n isValid = false\n $log.unknownType(field)\n break\n }\n return isValid\n }\n\n // check if object\n if (!hasType(object, 'object')) {\n result = false\n $log.invalidConfiguration(object, 'object')\n }\n\n // type\n for (fieldName in object) {\n field = object[fieldName]\n\n if (\n !hasType(schema[fieldName], 'undefined') ||\n fieldName === $mson.CORE ||\n fieldName === $mson.ID\n ) {\n switch (true) {\n case fieldName === $mson.CORE:\n typeSchema = 'boolean'\n break\n case fieldName === $mson.ID:\n typeSchema = 'string'\n break\n default:\n typeSchema = schema[fieldName].type\n break\n }\n } else {\n if (strict) {\n $log.unknownProperty(fieldName, schema)\n return false\n } else {\n continue\n }\n }\n\n switch (true) {\n case isCustomType(typeSchema):\n result = result && _isValidCustomType(field, typeSchema)\n break\n case isClassName(typeSchema):\n result = result && _isValidClassName(field, typeSchema)\n break\n default:\n result = result && _isValidType(field, typeSchema)\n break\n }\n }\n\n // mandatory\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n if (object && hasType(object[fieldName], 'undefined')) {\n if (mandatory === true) {\n $log.missingProperty(fieldName)\n result = false\n }\n }\n }\n\n return result\n}\n\n/**\n * Prepare the object in order to be compliant with the schema.\n * @method prepareObject\n * @param {Object} object object to prepate\n * @param {Object} schema schema that validates the object\n */\nfunction prepareObject(object, schema) {\n let fieldName = ''\n let field = null\n let mandatory = true\n let defaultValue = ''\n\n schema = JSON.parse(JSON.stringify(schema))\n\n // mandatory & default value\n for (fieldName in schema) {\n field = schema[fieldName]\n mandatory = field.mandatory\n defaultValue = field.default\n if (hasType(object[fieldName], 'undefined')) {\n if (mandatory === false && !hasType(defaultValue, 'undefined')) {\n object[fieldName] = defaultValue\n }\n }\n }\n}\n\n/**\n * @method getSchema\n * @param {String} name of the schema\n * @returns {Object} the schema\n * @description Get a schema\n */\nfunction getSchema(name) {\n let result = null\n\n if (store.generatedSchemas[name]) {\n result = store.generatedSchemas[name]\n }\n return result\n}\n\n/**\n * @method getModel\n * @param {String} name of the model\n * @returns {Object} the model\n * @description Get a model\n */\nfunction getModel(name) {\n let result = null\n\n if (store.generatedModels[name]) {\n result = store.generatedModels[name]\n }\n return result\n}\n\n/**\n * @method getType\n * @param {String} name of the type\n * @returns {Object} the type\n * @description Get a type\n */\nfunction getType(name) {\n let result = null\n\n if (store.type[name] && store.type[name]) {\n result = JSON.parse(JSON.stringify(store.type[name]))\n }\n return result\n}\n\n/**\n * @method getModelPathType\n * @param {String} model name of the model\n * @param {String} path path of the structure\n * @returns {Object} the type\n * @description Get the type of a model path\n */\nfunction getModelPathType(model, path) {\n let result = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n result = getModel(model)[subpath].type\n } else {\n if (Array.isArray(result)) {\n result = result[0]\n }\n\n if (isCustomType(result)) {\n structure = getType(result)\n\n switch (true) {\n case typeof structure.schema !== 'undefined':\n if (!structure.schema[subpath]) {\n $log.unknownPath(path, subpath)\n } else {\n result = structure.schema[subpath].type\n }\n break\n case typeof structure.type !== 'undefined':\n result = structure.type\n break\n default:\n $log.invalidState(model, path)\n break\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method isValidModelPath\n * @param {String} model name of the model\n * @param {String} path path of the model\n * @returns {Boolean} true if the path is valid for the model\n * @description Check if a path is valid model path\n */\nfunction isValidModelPath(model, path) {\n let result = true\n let type = null\n let subpaths = []\n let subpath = ''\n let i = 0\n let length = 0\n let structure = ''\n\n subpaths = path.split('.')\n length = subpaths.length\n\n for (i = 0; i < length; i++) {\n subpath = subpaths[i]\n subpath = subpath.split('[')[0]\n if (i === 0) {\n type = getModel(model)[subpath].type\n if (!type) {\n result = false\n }\n } else {\n if (Array.isArray(result)) {\n type = type[0]\n }\n\n if (isCustomType(type)) {\n structure = getType(type)\n if (structure.schema && structure.schema[subpath]) {\n type = structure.schema[subpath].type\n if (!type) {\n result = false\n }\n }\n }\n }\n }\n return result\n}\n\n/**\n * @method get\n * @param {String} id id of the schema\n * @returns {Array} id id of the parents\n * @description Get parents of a schema if any\n */\nfunction getParents(id) {\n let result = []\n\n if (!store.inheritanceTree[id]) {\n result = []\n } else {\n result = store.inheritanceTree[id].slice()\n }\n\n return result\n}\n\n/**\n * @method inheritFrom\n * @param {String} name name of the class\n * @param {String} parentName name of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @description Check if a class inherits from another one\n */\nfunction inheritFrom(name, parentName) {\n let result = false\n let parents = []\n let i = 0\n let length = 0\n\n /**\n * @method _searchParent\n * @param {String} className name of the class\n * @param {String} ancestorName of the parent\n * @returns {Boolean} true if the component inherit from the specific class name\n * @private\n * @description Check if a class inherits from another one\n */\n function _searchParent(className, ancestorName) {\n let isAncestor = false\n let parents = []\n let i = 0\n let length = 0\n\n parents = getParents(className)\n if (parents.length !== 0) {\n if (parents.indexOf(ancestorName) !== -1) {\n isAncestor = true\n } else {\n for (i = 0; i < length; i++) {\n isAncestor = _searchParent(parents[i], ancestorName)\n if (isAncestor) {\n break\n }\n }\n }\n }\n return isAncestor\n }\n\n if (name !== parentName) {\n parents = getParents(name)\n length = parents.length\n\n if (parents.length !== 0) {\n if (parents.indexOf(parentName) !== -1) {\n result = true\n } else {\n for (i = 0; i < length; i++) {\n result = _searchParent(parents[i], parentName)\n if (result) {\n break\n }\n }\n }\n }\n } else {\n result = true\n }\n\n return result\n}\n\n/**\n * @method isClassName\n * @param {String} value\n * @returns {Boolean} true if the name is a class name\n * @description Is the value a class name\n */\nfunction isClassName(value) {\n let result = hasType(value, 'string')\n\n if (result) {\n if (Object.keys(store.generatedModels).length > 0) {\n result = typeof store.generatedModels[value] !== 'undefined'\n } else {\n result = false\n }\n }\n\n return result\n}\n\nexport default {\n schema,\n model,\n type,\n init,\n clear,\n create,\n isEvent,\n isProperty,\n isLink,\n isCollection,\n isMethod,\n isStructure,\n isValidState,\n isValidType,\n isValidEnum,\n isValidSchema,\n isValidObject,\n prepareObject,\n getSchema,\n getModel,\n getType,\n getModelPathType,\n isValidModelPath,\n getParents,\n inheritFrom,\n isClassName,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module behavior\n * @requires db\n * @requires helper\n * @requires mson\n * @description This module manages the behaviors of all components.\n * A behavior is a mecanism that allow users to add actions that will be executed\n * when a specific state of a component will change.\n */\n\nimport $db from './db.js'\nimport $helper from './helper.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @method createFunction\n * @param {String} name default name of the function\n * @param {String} func a stringified function\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the function (default false)\n * @returns {Function} the created function\n * @private\n * @description Create a function from a string.\n * The created function:\n * - will be a named function,\n * - has the context of the component and\n * - can have some core modules injected as parameters\n */\nfunction createFunction(name, func, useCoreAPI) {\n let beginBody = -1\n let funcParams = ''\n let params = []\n let paramsClean = []\n let funcBody = ''\n let header = ''\n let action = null\n let isArrowFunction = true\n let isAsync = false\n let isOneLine = false\n let functionName = name\n\n if (functionName.indexOf('.') !== -1) {\n functionName = name.split('.')[name.split('.').length - 1]\n }\n\n if (func.trim().indexOf('async') === 0) {\n isAsync = true\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n if (isArrowFunction) {\n beginBody = func.indexOf('=>')\n\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 2, func.length).trim()\n\n if (funcBody.indexOf('{') === 0) {\n funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim()\n }\n\n if (funcBody.indexOf('\\n') === -1) {\n isOneLine = true\n }\n\n if (isArrowFunction && isOneLine && funcBody.indexOf('return ') === -1) {\n funcBody = 'return ' + funcBody\n }\n } else {\n beginBody = func.indexOf('{')\n header = func.substring(0, beginBody)\n\n funcParams = header.split('(')[1].replace(')', '').trim()\n\n params = funcParams.split(',')\n params.forEach(function (param) {\n paramsClean.push(param.trim())\n })\n\n funcBody = func.substring(beginBody + 1)\n funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim()\n }\n\n // fix for Babel\n funcBody = funcBody.replace(/_this/g, 'this')\n\n if (paramsClean[0] === '') {\n paramsClean = []\n }\n\n if (useCoreAPI) {\n paramsClean.push('$component')\n paramsClean.push('$db')\n paramsClean.push('$metamodel')\n paramsClean.push('$workflow')\n paramsClean.push('$behavior')\n paramsClean.push('$state')\n paramsClean.push('$log')\n paramsClean.push('$helper')\n paramsClean.push('$history')\n }\n\n if (isAsync) {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { const AsyncFunction = async function () {}.constructor; return new AsyncFunction('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { const AsyncFunction = async function () {}.constructor; return new AsyncFunction(__action).apply(this, arguments) };'\n )(funcBody)\n }\n } else {\n if (paramsClean[0] !== '') {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' (' +\n paramsClean.join(', ') +\n \") { return new Function('\" +\n paramsClean.join(\"', '\") +\n \"', __action).apply(this, arguments) };\"\n )(funcBody)\n } else {\n action = new Function(\n '__action',\n 'return function ' +\n functionName +\n ' () { return new Function(__action).apply(this, arguments) };'\n )(funcBody)\n }\n }\n\n return action\n}\n\n/* Public methods */\n\n/**\n * @method add\n * @param {String} id id of the component\n * @param {Object} state the state on which the action will be executed\n * @param {Object} action the action to execute when the component will have a specific state\n * @param {Boolean} useCoreAPI if true, System Runtime core modules will be injected as parameters of the action (default false)\n * @param {Object} context new context of the behavior\n * @returns {String} id of the behavior created in System Runtime database\n * @description Add a behavior that will be stored in System Runtime database\n */\nfunction add(id, state, action, useCoreAPI, core, context) {\n let behaviorId = $helper.generateId()\n let strAction = action.toString()\n\n if (typeof core === 'undefined') {\n core = false\n }\n if (typeof useCoreAPI === 'undefined') {\n useCoreAPI = false\n }\n\n action = createFunction(state, strAction, useCoreAPI)\n\n store[behaviorId] = action\n\n $db.collections._Behavior.insert({\n _id: behaviorId,\n component: id,\n state: state,\n action: strAction,\n useCoreAPI: useCoreAPI,\n core: core,\n context: context,\n })\n\n return behaviorId\n}\n\n/**\n * @method remove\n * @param {Object} params\n * {String} componentId id of the component\n * {String} state state of the component\n * {String} behaviorId id of the behavior (optional)\n * @description Remove a behavior with its id or remove all the behaviors for a specific state\n * of the component\n */\nfunction remove(params) {\n let result = []\n\n params = params || {}\n params.behaviorId = params.behaviorId || ''\n params.componentId = params.componentId || ''\n params.state = params.state || ''\n\n if (params.componentId) {\n if (params.behaviorId) {\n $db.collections._Behavior.remove({\n _id: params.behaviorId,\n component: params.componentId,\n state: params.state,\n })\n delete store[params.behaviorId]\n } else {\n if (params.state) {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n state: params.state,\n })\n } else {\n result = $db.collections._Behavior.remove({\n component: params.componentId,\n })\n }\n result.forEach(function (id) {\n delete store[id]\n })\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a behavior with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method getActions\n * @param {String} id id of the component\n * @param {String} state name of the state\n * @returns {Array} all the actions that have to be executed for a specific component and state\n * @description Get all the actions of a behavior for a component\n */\nfunction getActions(id, state) {\n let result = []\n let dbResult = []\n let action = null\n\n dbResult = $db.collections._Behavior.find({\n component: id,\n state: state,\n })\n\n dbResult.forEach(function (behavior) {\n action = store[behavior[$mson.ID]]\n if (typeof action === 'undefined') {\n action = createFunction(\n behavior.state,\n behavior.action,\n behavior.useCoreAPI\n )\n store[behavior[$mson.ID]] = action\n }\n result.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: action,\n })\n })\n\n return result\n}\n\n/**\n * @method clear\n * @description Remove all the behaviors stored in memory\n */\nfunction clear() {\n store = {}\n}\n\n/**\n * @method get\n * @param {String} id id of the behavior\n * @returns {Behavior} the behavior\n * @description Get a behavior by its id\n */\nfunction get(id) {\n return store[id]\n}\n\nexport default {\n add,\n remove,\n removeFromMemory,\n getActions,\n clear,\n get,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module state\n * @description This module manages the states of all the components\n */\n\n/* Private property */\n\nlet store = {}\n\n/* Public methods */\n\n/**\n * @method set\n * @param {String} id component id on which change the state\n * @param {String} state the new state of the component\n * @param {Object} value value of the state\n * @description Set the state of a component\n */\nfunction set(id, state, value) {\n store[id] = {\n state: state,\n value: value,\n }\n}\n\n/**\n * @method get\n * @param {String} id id of the component\n * @returns {String} state of the component\n * @description Get the state of a component\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the states of the components from the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n set,\n get,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module history\n * @requires db\n * @requires log\n * @description This module manages the history of all components lifecycle\n */\n\nimport $db from './db.js'\nimport $log from './log.js'\n\n/* Private property */\n\nlet stack = []\nlet cursorIndex = -1\nlet historizationEnabled = false\n\n/* Public methods */\n\n/**\n * @method isEnabled\n * @returns {Boolean} true if the history is enabled\n * @description Is historization enabled\n */\nfunction isEnabled() {\n return historizationEnabled\n}\n\n/**\n * @method start\n * @description start historization\n */\nfunction start() {\n historizationEnabled = true\n}\n\n/**\n * @method stop\n * @description stop historization\n */\nfunction stop() {\n historizationEnabled = false\n}\n\n/**\n * @method pushState\n * @param {Object} state new state\n * @description Add a state in the history\n */\nfunction pushState(state) {\n stack.push(state)\n}\n\n/**\n * @method state\n * @returns {Object} current state\n * @description get Current state\n */\nfunction state() {\n return state[state.length - 1]\n}\n\n/**\n * @method back\n * @returns {Integer} current cursor index\n * @description move backward into the history of state\n */\nfunction back() {\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'remove':\n $db.collections[state.collection].insert(JSON.parse(state.oldValue))\n $log.historyDocumentInserted(state.id, state.collection, state.oldValue)\n break\n case 'update':\n update[state.field] = JSON.parse(state.oldValue)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.oldValue\n )\n break\n default:\n break\n }\n cursorIndex = cursorIndex - 1\n }\n\n return cursorIndex\n}\n\n/**\n * @method forward\n * @returns {Integer} current cursor index\n * @description move forward into the history of state\n */\nfunction forward() {\n cursorIndex = cursorIndex + 1\n let state = stack[cursorIndex]\n let update = {}\n if (state) {\n switch (state.action) {\n case 'insert':\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(state.id, state.collection, state.value)\n break\n case 'remove':\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n break\n case 'update':\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n break\n default:\n break\n }\n }\n\n return cursorIndex\n}\n\n/**\n * @method get\n * @param {}\n * @description Start back/forward from state\n */\nfunction get(index) {\n let result = null\n if (index < 0) {\n result = stack[stack.length + index]\n } else {\n result = stack[index]\n }\n return result\n}\n\n/**\n * @method from\n * @param {Number} index index of the stack\n * @description Start back/forward from state\n */\nfunction from(index) {\n if (index === -1) {\n cursorIndex = stack.length - 1\n } else {\n cursorIndex = index\n }\n}\n\n/**\n * @method dump\n * @returns {String} a dump of the history\n * @description Dump all the history\n */\nfunction dump() {\n return JSON.stringify({\n stack: stack,\n })\n}\n\n/**\n * @method load\n * @param {Object|String} dump dump of an history to load\n * @returns {Boolean} true if the dump was loaded with no error\n * @description Load a dump of an history\n */\nfunction load(dump) {\n let noError = true\n\n try {\n let newStack = {}\n let update = {}\n\n if (typeof dump === 'string') {\n newStack = JSON.parse(dump).stack\n } else {\n newStack = dump.stack\n }\n\n newStack.forEach(function (state) {\n if (state) {\n switch (state.action) {\n case 'insert':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].insert(JSON.parse(state.value))\n $log.historyDocumentInserted(\n state.id,\n state.collection,\n state.value\n )\n } else {\n noError = false\n }\n break\n case 'remove':\n if ($db.collections[state.collection]) {\n $db.collections[state.collection].remove({\n _id: state.id,\n })\n $log.historyDocumentRemoved(state.id, state.collection)\n } else {\n noError = false\n }\n break\n case 'update':\n if ($db.collections[state.collection]) {\n update[state.field] = JSON.parse(state.value)\n\n $db.collections[state.collection].update(\n {\n _id: state.id,\n },\n update\n )\n\n $log.historyDocumentUpdated(\n state.id,\n state.collection,\n state.field,\n state.value\n )\n } else {\n noError = false\n }\n break\n default:\n break\n }\n }\n })\n } catch (e) {\n noError = false\n }\n\n return noError\n}\n\n/**\n * @method clear\n * @description Remove all the states from the memory\n */\nfunction clear() {\n stack = []\n}\n\nexport default {\n isEnabled,\n start,\n stop,\n pushState,\n state,\n back,\n forward,\n get,\n from,\n dump,\n load,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module workflow\n * @requires metamodel\n * @requires component\n * @requires behavior\n * @requires state\n * @requires helper\n * @requires log\n * @requires db\n * @description This module manages the workflow of System Runtime.\n * It behaves like a workflow engine.\n * It checks if the change of status of a component is valid to be executed. By valid, it means that:\n * - the state is valid for the component,\n * - the input (i.e. parameters) of all actions for the state are compliants with the model and\n * - the output of all actions are compliants with the model.\n *\n * If an error occurs, the workflow will call the error state of the component, the current system and the runtime.\n *\n */\n\nimport $metamodel from './metamodel.js'\nimport $component from './component.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $db from './db.js'\nimport $history from './history.js'\n\n/* Private methods */\n\n/**\n * @class RuntimeError\n * @constructor\n * @param {String} message message of the error\n * @description The RuntimeError class\n */\nfunction RuntimeError(message) {\n this.message = message\n this.name = 'RuntimeError'\n}\nRuntimeError.prototype = new Error()\nRuntimeError.prototype.constructor = RuntimeError\n\n/**\n * @method isModelPath\n * @param {String} value\n * @returns {Boolean}\n * @private\n * @description Is the value a model path\n */\nfunction isModelPath(value) {\n return value.indexOf('.') !== -1\n}\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the names of all parameters of the method for the class\n * @private\n * @description Get all the names of the parameter of a method\n */\nfunction getParamNames(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n } else {\n if (!isModelPath(methodName)) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getParamNumber\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} number of parameters min and max for the method\n * @private\n * @description Get the number of parameters of a method\n */\nfunction getParamNumber(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n let min = 0\n let max = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (\n typeof params[i].mandatory === 'undefined' ||\n params[i].mandatory === true\n ) {\n min = min + 1\n }\n max = max + 1\n }\n }\n result.push(min)\n result.push(max)\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method setDefaultValue\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @param {Array} args arguments\n * @returns {Array} arguments with default values\n * @private\n * @description Set the default value of the non mandatory parameters of a method\n */\nfunction setDefaultValue(id, methodName, args) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n method = $metamodel.getModel(id)[methodName]\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n if (params[i].mandatory === false && typeof args[i] === 'undefined') {\n result.push(params[i].default)\n } else {\n result.push(args[i])\n }\n }\n }\n } else {\n if (methodName.indexOf('[') === -1) {\n $log.unknownMethod(id, methodName)\n } else {\n result = args\n }\n }\n return result\n}\n\n/**\n * @method getReturnType\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {String} the type returned by the method\n * @private\n * @description Get the type returned by a method\n */\nfunction getReturnType(id, methodName) {\n let resultType = null\n let result = null\n\n if ($metamodel.getModel(id)) {\n resultType = $metamodel.getModel(id)[methodName].result\n } else {\n $log.unknownModel(id)\n }\n\n if (resultType) {\n result = resultType\n }\n return result\n}\n\n/**\n * @method getParamTypes\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} the types of the parameters of a method\n * @private\n * @description Get all the type of the parameters of a method\n */\nfunction getParamTypes(id, methodName) {\n let method = null\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n if ($metamodel.getModel(id)) {\n method = $metamodel.getModel(id)[methodName]\n } else {\n $log.unknownModel(id)\n }\n\n if (method) {\n params = method.params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].type)\n }\n }\n } else {\n if (methodName.indexOf('[') === -1 && methodName.indexOf('.') === -1) {\n $log.unknownMethod(id, methodName)\n }\n }\n return result\n}\n\n/**\n * @method getActions\n * @param {Object} component a System Runtime component\n * @param {String} name name of the state\n * @param {Boolean} isEvent true if the state is an event\n * @returns {Array} list of the actions\n * @private\n * @description Get the actions of the specified state\n */\nfunction getActions(component, name, isEvent) {\n let action = $behavior.getActions(component.id(), name)\n let parents = []\n let length = 0\n let i = 0\n let parent = null\n\n if (!action.length || isEvent) {\n if (component.constructor.name !== 'Function') {\n action = action.concat(\n getActions($component.get(component.constructor.name), name, isEvent)\n )\n } else {\n parents = $metamodel.getParents(component.name)\n length = parents.length\n for (i = 0; i < length; i++) {\n parent = $component.get(parents[i])\n if (parent) {\n action = action.concat(getActions(parent, name, isEvent))\n } else {\n $log.unknownComponent(parents[i], component.name)\n }\n if (action.length) {\n break\n }\n }\n }\n }\n\n if (action.length) {\n action.reverse()\n }\n\n return action\n}\n\n/**\n * @method action\n * @param {Component} component\n * @param {String} state name of the state\n * @param {Object} action action\n * @param {Array} params parameters of the action\n * @param {Boolean} isEvent is the action a callback of an event\n * @returns {Boolean} result of the action\n * @description Execute an action and make some Dependency Injection if it is a core action\n */\nfunction action(component, state, action, params, isEvent) {\n let result = null\n let injectedParams = []\n let componentClassName = ''\n let i = 0\n let length = 0\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n if (\n !$metamodel.isProperty(state, componentClassName) &&\n !$metamodel.isLink(state, componentClassName) &&\n !$metamodel.isCollection(state, componentClassName)\n ) {\n params = setDefaultValue(componentClassName, state, params)\n }\n\n try {\n length = params.length\n for (i = 0; i < length; i++) {\n injectedParams.push(params[i])\n }\n\n if (action.useCoreAPI) {\n injectedParams.push($component)\n injectedParams.push($db)\n injectedParams.push($metamodel)\n injectedParams.push({\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n })\n injectedParams.push($behavior)\n injectedParams.push($state)\n injectedParams.push($log)\n injectedParams.push($helper)\n injectedParams.push($history)\n }\n\n if (isEvent) {\n if (action.context) {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [action.context].concat(injectedParams)\n ),\n 0\n )\n } else {\n setTimeout(\n action.action.bind.apply(\n action.action,\n [component].concat(injectedParams)\n ),\n 0\n )\n }\n } else {\n if (action.context) {\n result = action.action.apply(action.context, injectedParams)\n } else {\n result = action.action.apply(component, injectedParams)\n }\n }\n } catch (e) {\n if (e instanceof RuntimeError) {\n throw e\n } else {\n if (component && component.error) {\n component.error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n if ($helper.getRuntime()) {\n // do not invoke the error action of the system twice\n if (\n component &&\n $helper.getRuntime().system() &&\n $helper.getRuntime().system().id &&\n component.id() !== $helper.getRuntime().system().id()\n ) {\n $helper\n .getRuntime()\n .system()\n .error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $helper.getRuntime().error({\n message:\n \"error when running the behavior '\" +\n state +\n \"' on component '\" +\n component.id() +\n \"'\",\n stack: e,\n })\n }\n\n $log.actionInvokeError(\n state,\n component.id(),\n component.constructor.name,\n e.message\n )\n }\n }\n\n return result\n}\n\n/* Public methods */\n\n/**\n * @method checkInputNumbers\n * @param {String} className name the class\n * @param {String} state state on which the action applied\n * @param {Function} action action\n * @returns {Boolean} true if the action is the valid number of parameters\n * @description Check if an action has the valid number of parameter\n */\nfunction checkInputNumbers(className, state, action) {\n let func = ''\n let beginBody = -1\n let header = ''\n let funcParams = ''\n let params = []\n let paramNumber = 0\n let modelNumberParam = []\n let isProperty = false\n let isLink = false\n let isCollection = false\n let result = false\n let isArrowFunction = true\n\n // check number of parameters of the action\n func = action.toString()\n\n if (func.trim().indexOf('async') === 0) {\n func = func.replace('async', '')\n }\n\n if (func.trim().indexOf('function') === 0) {\n isArrowFunction = false\n }\n\n beginBody = isArrowFunction ? func.indexOf('=>') : func.indexOf('{')\n header = func.substring(0, beginBody)\n header = header.replace('=>', '')\n\n if (header.indexOf('(') !== -1) {\n funcParams = header.split('(')[1].replace(')', '').trim()\n } else {\n funcParams = header.trim()\n }\n\n params = funcParams.split(',')\n if (params[0] === '') {\n params = []\n }\n paramNumber = params.length\n\n // get the number min and max of valid parameters\n isProperty = $metamodel.isProperty(state, className)\n isLink = $metamodel.isLink(state, className)\n isCollection = $metamodel.isCollection(state, className)\n\n switch (true) {\n case isCollection:\n modelNumberParam = [2, 2]\n break\n case isProperty:\n if ($metamodel.getModelPathType(className, state) === 'array') {\n modelNumberParam = [2, 2]\n } else {\n modelNumberParam = [1, 1]\n }\n break\n case isLink:\n modelNumberParam = [1, 1]\n break\n default:\n modelNumberParam = getParamNumber(className, state)\n break\n }\n\n // compare\n if (\n modelNumberParam[0] <= paramNumber &&\n paramNumber <= modelNumberParam[1]\n ) {\n result = true\n }\n\n return result\n}\n\n/**\n * @method checkInput\n * @param {Object} params\n * @returns {Boolean} true if condition on input are compliant with the model\n * @description Check if conditions on input are compliant with the model before calling the action\n */\nfunction checkInput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let args = params.args || ''\n let paramsName = []\n let paramsType = []\n let paramsNumber = []\n let componentClassName = ''\n let length = args.length\n let i = 0\n let param = null\n let result = true\n let isProperty = false\n let isLink = false\n let isCollection = false\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(methodName, componentClassName)\n isLink = $metamodel.isLink(methodName, componentClassName)\n isCollection = $metamodel.isCollection(methodName, componentClassName)\n paramsName = getParamNames(componentClassName, methodName)\n\n switch (true) {\n case isCollection && methodName.indexOf('.') === -1:\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [\n [$metamodel.getModel(componentClassName)[methodName].type[0]],\n 'string',\n ]\n } else {\n paramsType = [\n $metamodel.getModel(componentClassName)[methodName].type[0],\n 'string',\n ]\n }\n paramsNumber = [2, 2]\n break\n case isProperty && methodName.indexOf('.') === -1:\n if (isModelPath(methodName)) {\n paramsType = [\n $metamodel.getModelPathType(componentClassName, methodName),\n ]\n } else {\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n }\n if (\n $metamodel.getModelPathType(componentClassName, methodName) === 'array'\n ) {\n if (args && args[1] && args[1] === 'reset') {\n paramsType = [['any'], 'string']\n } else {\n paramsType = ['any', 'string']\n }\n paramsNumber = [2, 2]\n } else {\n paramsNumber = [1, 1]\n }\n break\n case isLink && methodName.indexOf('.') === -1:\n paramsType = [$metamodel.getModel(componentClassName)[methodName].type]\n paramsNumber = [1, 1]\n break\n default:\n paramsType = getParamTypes(componentClassName, methodName)\n paramsNumber = getParamNumber(componentClassName, methodName)\n break\n }\n\n // case of object\n if (typeof length === 'undefined') {\n length = 1\n }\n\n if (length < paramsNumber[0] || paramsNumber[1] < length) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n }\n\n for (i = 0; i < length; i++) {\n param = args[i]\n if (typeof param === 'undefined') {\n if (i < paramsNumber[0]) {\n result = false\n $log.invalidParamNumber(\n component.id(),\n component.constructor.name,\n methodName\n )\n } else {\n continue\n }\n } else {\n if (!$metamodel.isValidType(param, paramsType[i])) {\n result = false\n $log.invalidParamType(\n component.id(),\n component.constructor.name,\n methodName,\n paramsName[i]\n )\n }\n }\n }\n\n return result\n}\n\n/**\n * @method checkOutput\n * @param {Object} params\n * @returns {Boolean} true if conditions on ouput are compliant with the metamodel\n * @description Check if conditions on output are compliant with the metamodel\n */\nfunction checkOutput(params) {\n params = params || {}\n\n let component = params.component || null\n let methodName = params.methodName || ''\n let methodResult = null\n let componentClassName = ''\n let returnType = null\n let result = true\n\n if (typeof params.methodResult !== 'undefined') {\n methodResult = params.methodResult\n } else {\n methodResult = undefined\n }\n\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n returnType = getReturnType(componentClassName, methodName)\n if (!$metamodel.isValidType(methodResult, returnType)) {\n result = false\n $log.invalidResultType(\n component.id(),\n component.constructor.name,\n methodName,\n typeof returnType === 'string' ? returnType : JSON.stringify(returnType),\n Array.isArray(methodResult) ? 'array' : typeof methodResult\n )\n }\n\n return result\n}\n\n/**\n * @method process\n * @param {Object} params params to process\n * {String} component id of the component\n * {String} state state of the component\n * {Array} data parameters to send to the action\n * @description Task processing.\n */\nfunction process(params) {\n params = params || {}\n\n params.id = params.id || ''\n params.component = params.component || ''\n params.state = params.state || ''\n params.data = params.data || []\n params.context = params.context || null\n\n let component = null\n let currentState = ''\n let actions = []\n let result = undefined\n let i = 0\n let length = 0\n let componentClassName = false\n let isProperty = false\n let isLink = false\n let isCollection = false\n let isEvent = false\n let isMethod = false\n let behaviors = []\n let behavior = null\n let actionFromMemory = null\n\n currentState = $state.get(params.component)\n\n // check state\n if (currentState && currentState.state === 'destroy') {\n $log.invalidUseOfComponent(params.component)\n }\n\n // case of event processing\n if (params.id) {\n behaviors = $db.collections._Behavior.find({\n _id: params.id,\n })\n\n if (behaviors.length === 0) {\n behavior = behaviors[0]\n component = $component.get(behavior.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(behavior.state, componentClassName)\n isLink = $metamodel.isLink(behavior.state, componentClassName)\n isCollection = $metamodel.isCollection(\n behavior.state,\n componentClassName\n )\n isEvent = $metamodel.isEvent(behavior.state, componentClassName)\n isMethod = $metamodel.isMethod(behavior.state, componentClassName)\n\n actionFromMemory = $behavior.get(params.id)\n if (actionFromMemory) {\n actions.push({\n useCoreAPI: behavior.useCoreAPI,\n context: behavior.context,\n action: actionFromMemory,\n })\n }\n }\n }\n } else {\n component = $component.get(params.component)\n\n if (component) {\n if (component.constructor.name === 'Function') {\n componentClassName = component.name\n } else {\n componentClassName = component.constructor.name\n }\n\n isProperty = $metamodel.isProperty(params.state, componentClassName)\n isLink = $metamodel.isLink(params.state, componentClassName)\n isCollection = $metamodel.isCollection(params.state, componentClassName)\n isEvent = $metamodel.isEvent(params.state, componentClassName)\n isMethod = $metamodel.isMethod(params.state, componentClassName)\n\n actions = getActions(component, params.state, isEvent)\n }\n }\n\n if (actions.length) {\n if (\n checkInput({\n component: component,\n methodName: params.state,\n args: params.data,\n })\n ) {\n if (isMethod) {\n result = action(\n params.context || component,\n params.state,\n actions[0],\n params.data,\n false\n )\n\n checkOutput({\n component: component,\n methodName: params.state,\n methodResult: result,\n })\n } else {\n length = actions.length\n for (i = 0; i < length; i++) {\n action(\n params.context || component,\n params.state,\n actions[i],\n params.data,\n true\n )\n }\n\n $state.set(component.id(), params.state, params.data)\n }\n }\n } else {\n if (component && (isEvent || isProperty || isLink || isCollection)) {\n $state.set(component.id(), params.state, params.data)\n }\n }\n\n return result\n}\n\nexport default {\n checkInputNumbers,\n checkInput,\n checkOutput,\n process,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module component\n * @requires workflow\n * @requires db\n * @requires metamodel\n * @requires behavior\n * @requires helper\n * @requires log\n * @requires state\n * @requires mson\n * @requires history\n * @description This module manages the components.\n * It is the factory of all the components that are created by System Runtime.\n */\n\nimport $workflow from './workflow.js'\nimport $db from './db.js'\nimport $metamodel from './metamodel.js'\nimport $behavior from './behavior.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $state from './state.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet store = {}\n\n/* Private methods */\n\n/**\n * @class _Array\n * @param {Object} conf\n * {String} classId name of the class\n * {String} type type of the array\n * {Array} arr array\n * @private\n * @description Sub class to override many methods of Array Class\n */\nfunction _Array(conf) {\n let arr = []\n let arrDb = []\n let type = ''\n let id = ''\n let classId = ''\n let propertyName = ''\n let isReadOnly = false\n let isClassName = false\n\n conf = conf || {}\n type = conf.type || ''\n id = conf.id || ''\n propertyName = conf.propertyName || ''\n arrDb = conf.arr || []\n classId = conf.classId || ''\n\n if (typeof conf.readOnly !== 'undefined') {\n isReadOnly = conf.readOnly\n }\n\n isClassName = $metamodel.isClassName(type)\n\n // init\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr.push($helper.getRuntime().require(val))\n } else {\n arr.push(val)\n }\n })\n\n /**\n * @method _copy\n * @private\n * @description copy the array\n */\n function _copy() {\n let i = 0\n let j = 0\n let length = arr.length\n\n arrDb.forEach(function (val) {\n if (isClassName) {\n arr[i] = $helper.getRuntime().require(val)\n } else {\n arr[i] = val\n }\n i = i + 1\n })\n\n for (j = i; j < length; j++) {\n delete arr[j]\n }\n arr.length = arrDb.length\n }\n\n /**\n * @method _add\n * @param {String} val value to add\n * @param {String} action type of action\n * @param {Number} start\n * @param {String} deleteCount\n * @private\n * @description add an item in the array\n */\n function _add(val, action, start, deleteCount) {\n let i = 0\n let length = 0\n let del = []\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (isClassName) {\n if (val && $metamodel.inheritFrom(val.constructor.name, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val.id())\n break\n case action === 'unshift':\n arrDb.unshift(val.id())\n break\n case action === 'splice':\n del = arrDb.splice(start, deleteCount, val)\n\n length = del.length\n for (i = 0; i < length; i++) {\n $workflow.process({\n component: id,\n state: propertyName,\n data: [store[del[i]], 'remove'],\n })\n }\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n } else {\n if (val && $metamodel.isValidType(val, type)) {\n switch (true) {\n case action === 'push':\n arrDb.push(val)\n break\n case action === 'unshift':\n arrDb.unshift(val)\n break\n case action === 'splice':\n arrDb.splice(start, deleteCount, val)\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [val, 'add'],\n })\n } else {\n $log.invalidPropertyName(id, classId, propertyName, val, type)\n }\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return arrDb.length\n }\n\n /**\n * @method _remove\n * @param {String} action\n * @private\n * @description remove an item from the array\n */\n function _remove(action) {\n let result\n let val = null\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (!isReadOnly) {\n if (arrDb.length !== 0) {\n switch (true) {\n case action === 'pop':\n val = arrDb.pop()\n break\n case action === 'shift':\n val = arrDb.shift()\n break\n default:\n break\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n if (isClassName) {\n result = store[val]\n } else {\n result = val\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [result, 'remove'],\n })\n }\n } else {\n $log.readOnlyProperty(id, classId, propertyName)\n }\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} val\n * @description Override push method\n */\n arr.push = function push(val) {\n let result = _add(val, 'push')\n\n arr[arr.length] = val\n\n return result\n }\n\n /**\n * @method pop\n * @returns {_Component|Object} value\n * @description Override pop method\n */\n arr.pop = function pop() {\n let result = _remove('pop')\n let length = arr.length\n\n if (length !== 0) {\n delete arr[length]\n arr.length = length - 1\n }\n\n return result\n }\n\n /**\n * @method shift\n * @returns {_Component|Object} value\n * @description Override shift method\n */\n arr.shift = function shift() {\n let result = _remove('shift')\n _copy()\n\n return result\n }\n\n /**\n * @method unshift\n * @param {_Component|Object} val\n * @description Override unshift method\n */\n arr.unshift = function unshift(val) {\n let result = _add(val, 'unshift')\n _copy()\n\n return result\n }\n\n /**\n * @method push\n * @param {_Component|Object} arr\n * @description Override concat method\n */\n arr.concat = function concat(arr) {\n let i = 0\n let length = 0\n let result = null\n\n if (Array.isArray(arr)) {\n length = arr.length\n for (i = 0; i < length; i++) {\n _add(arr[i], 'push')\n }\n }\n\n conf.arr = arrDb\n\n result = new _Array(conf)\n _copy()\n\n return result\n }\n\n /**\n * @method sort\n * @param {Function} funct the sort function\n * @returns {_Array} the current _Array\n * @description Override sort method\n */\n arr.sort = function sort(funct) {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n arrDb.sort(funct)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method reverse\n * @returns {_Array} the reversed _Array\n * @description Override reverse method\n */\n arr.reverse = function reverse() {\n let oldValue = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n arrDb.reverse()\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n _copy()\n\n return arr\n }\n\n /**\n * @method splice\n * @returns {_Array} the spliced _Array\n * @description Override splice method\n */\n arr.splice = function splice(start, deleteCount, val) {\n let oldValue = null\n let result = []\n let i = 0\n let length = 0\n let data = null\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(arrDb)\n }\n\n if (typeof val !== 'undefined') {\n _add(val, 'splice', start, deleteCount)\n } else {\n result = arrDb.splice(start, deleteCount)\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: id,\n field: propertyName,\n value: JSON.stringify(arrDb),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: id,\n field: propertyName,\n value: arrDb,\n })\n }\n\n length = result.length\n for (i = 0; i < length; i++) {\n if (isClassName) {\n data = store[result[i]]\n } else {\n data = result[i]\n }\n\n $workflow.process({\n component: id,\n state: propertyName,\n data: [data, 'remove'],\n })\n }\n }\n\n _copy()\n\n return result\n }\n\n /**\n * @method slice\n * @returns {_Array} the sliced _Array\n * @description Override slice method\n */\n arr.slice = function slice(begin, end) {\n let result = arrDb.slice(begin, end)\n _copy()\n\n return result\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method getParamNames\n * @param {String} id id of the class\n * @param {String} methodName name of the method\n * @returns {Array} all the names of method parameters of the class\n * @private\n * @description Get all the names of method parameters\n */\nfunction getParamNames(id, methodName) {\n let params = []\n let result = []\n let length = 0\n let i = 0\n\n params = $metamodel.getModel(id)[methodName].params\n if (params) {\n length = params.length\n for (i = 0; i < length; i++) {\n result.push(params[i].name)\n }\n }\n return result\n}\n\n/**\n * @method getProperties\n * @param {String} id id of the class\n * @returns {Array} all the properties of the class\n * @private\n * @description Get all the property of a class\n */\nfunction getProperties(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (\n schema[propNames[i]] === $mson.LINK_TYPE ||\n schema[propNames[i]] === $mson.PROPERTY_TYPE ||\n schema[propNames[i]] === $mson.COLLECTION_TYPE\n ) {\n result.push({\n name: propNames[i],\n type: model[propNames[i]].type,\n readOnly: model[propNames[i]].readOnly,\n })\n }\n }\n\n return result\n}\n\n/**\n * @method getMethods\n * @param {String} id id of the class\n * @returns {Array} all the methods of the class\n * @private\n * @description Get all the method of a class\n */\nfunction getMethods(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.METHOD_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureProperties\n * @param {String} path path of the property\n * @param {String} name name of the model\n * @returns {Array} list of property schema of the structure type\n * @private\n * @description Get the schema of a structure\n */\nfunction getStructureProperties(path, model) {\n let type = null\n let structure = null\n let result = []\n let propNames = []\n\n type = $metamodel.getModelPathType(model, path)\n structure = $metamodel.getType(type)\n\n if (structure && structure.schema) {\n propNames = Object.keys(structure.schema)\n propNames.forEach(function (name) {\n structure.schema[name].name = name\n result.push(structure.schema[name])\n })\n }\n\n return result\n}\n\n/**\n * @method getEvents\n * @param {String} id id of the class\n * @returns {Array} all the events of the class\n * @private\n * @description Get all the event of a class\n */\nfunction getEvents(id) {\n let model = null\n let schema = null\n let propNames = []\n let length = 0\n let i = 0\n let result = []\n\n model = $metamodel.getModel(id)\n schema = $metamodel.getSchema(model[$mson.NAME])\n\n propNames = Object.keys(schema)\n\n length = propNames.length\n for (i = 0; i < length; i++) {\n if (schema[propNames[i]] === $mson.EVENT_TYPE) {\n result.push(propNames[i])\n }\n }\n\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @returns {Object} the value\n * @private\n * @description Get the value of a structure\n */\nfunction getStructureValue(model, id, path) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n if (result) {\n result = result[subPath[i]]\n }\n }\n }\n return result\n}\n\n/**\n * @method getStructureValue\n * @param {String} model name of the model\n * @param {String} id name of the component\n * @param {String} path\n * @param {String} value the value to set\n * @private\n * @description Set the value of a structure\n */\nfunction setStructureValue(model, id, path, value) {\n let result = null\n let doc = $db.store[model][id]\n let subPath = path.split('.')\n let length = subPath.length\n let i = 0\n let arr = ''\n let index = -1\n\n result = doc\n\n for (i = 0; i < length - 1; i++) {\n if (subPath[i].indexOf('[') !== -1) {\n arr = subPath[i].split('[')[0]\n index = subPath[i].split('[')[1].replace(']', '')\n result = result[arr][index]\n } else {\n result = result[subPath[i]]\n }\n }\n result[subPath[i]] = value\n}\n\n/**\n * @method createClasss\n * @param {String} classId name of the class\n * @returns {Function} the class\n * @private\n * @description Create a new class from a class definition\n */\nfunction createClass(classId) {\n let proxy = function proxy(config) {\n config = config || {}\n let proxy = {}\n\n if (config.constructor.name !== 'Object') {\n $log.invalidConctructorParameters(config, classId)\n config = {}\n }\n\n if (\n !$metamodel.isValidObject(\n config,\n $metamodel.getModel(classId),\n true,\n true\n )\n ) {\n $log.invalidParameters(classId, config)\n }\n\n $metamodel.prepareObject(config, $metamodel.getModel(classId))\n\n if (typeof config[$mson.ID] === 'undefined') {\n config[$mson.ID] = $helper.generateId()\n }\n\n store[config[$mson.ID]] = this\n\n // id\n proxy = function proxy() {\n return config[$mson.ID]\n }\n this.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n\n // create link to db\n $db.store[classId][config[$mson.ID]] = config\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: classId,\n id: config[$mson.ID],\n value: JSON.stringify(config),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: classId,\n document: config,\n })\n }\n\n Object.freeze(this)\n\n if (this.init) {\n this.init(config)\n }\n }\n return new Function(\n '__proxy',\n 'return function ' +\n classId +\n ' (config) { __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addIdClass\n * @param {Function} Class a class\n * @param {String} classId name of the class\n * @private\n * @description Add an id method to a class that will return its id\n */\nfunction addIdClass(Class, classId) {\n let proxy = function proxy() {\n return classId\n }\n Class.id = new Function(\n '__proxy',\n 'return function id () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addProperties\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n *\n * @example\n * laure.age(); // get the age of a person\n * laure.age(22); // set the age of a person\n */\nfunction addProperties(model, Class, classId) {\n let properties = getProperties(model)\n\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n function _isValidCollection(coll, type) {\n let result = true\n\n if (type !== 'any') {\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n if (\n !$metamodel.isValidType(val, type) &&\n !$metamodel.inheritFrom(val.constructor.name, type)\n ) {\n result = result && false\n }\n } else {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n }\n })\n }\n\n return result\n }\n\n function _getRealCollection(coll, type) {\n let result = []\n\n coll.forEach(function (val) {\n if ($metamodel.isClassName(type)) {\n switch (true) {\n case typeof val === 'string':\n result.push(val)\n break\n case typeof val.id !== 'undefined':\n result.push(val.id())\n break\n default:\n result.push(null)\n break\n }\n } else {\n result.push(val)\n }\n })\n\n return result\n }\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let realVal = null\n let oldValue = null\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: propertyType === 'array' ? 'any' : propertyType[0],\n arr: $db.store[classId][this.id()][propertyName],\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n realVal = _getRealCollection(\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n }\n } else {\n $log.invalidCollectionItem(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n propertyType === 'array' ? 'any' : propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n val = $db.store[classId][this.id()][propertyName][position]\n if (val) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n realVal = $helper.getRuntime().require(val)\n break\n case propertyType === 'array'\n ? 'array'\n : propertyType[0] === 'date':\n realVal = new Date(val)\n break\n case $metamodel.isStructure(propertyName, model):\n realVal = addStructure(\n '',\n propertyName + '[' + position + ']',\n model,\n this.id()\n )\n break\n default:\n realVal = val\n break\n }\n return realVal\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if (\n $metamodel.isValidType(\n value,\n propertyType === 'array' ? 'any' : propertyType[0]\n ) ||\n ($metamodel.inheritFrom(\n value.constructor.name,\n propertyType === 'array' ? 'array' : propertyType[0]\n ) &&\n $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ))\n ) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n switch (true) {\n case $metamodel.isClassName(\n propertyType === 'array' ? 'array' : propertyType[0]\n ):\n switch (true) {\n case typeof value === 'string':\n realVal = value\n break\n case typeof value.id !== 'undefined':\n realVal = value.id()\n break\n default:\n realVal = ''\n break\n }\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n }\n break\n default:\n realVal = ''\n break\n }\n\n component = search[0]\n component[propertyName][position] = realVal\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(component[propertyName]),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: component[propertyName],\n })\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType[0]\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let oldValue = null\n let realVal = null\n\n if (typeof value === 'undefined') {\n component = $db.store[classId][this.id()]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(component[propertyName])\n break\n case propertyType === 'date':\n propertyValue = new Date(component[propertyName])\n break\n case propertyType === 'json':\n propertyValue = component[propertyName]\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case propertyType === 'array':\n propertyValue = new _Array({\n id: this.id(),\n propertyName: propertyName,\n readOnly: propertyReadOnly,\n classId: classId,\n type: 'any',\n arr: $db.store[classId][this.id()][propertyName],\n })\n break\n case $metamodel.isStructure(propertyName, classId):\n propertyValue = addStructure('', propertyName, model, this.id())\n break\n default: // TODO case of object\n propertyValue = component[propertyName]\n break\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(propertyName, this.id())\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(\n this.id(),\n this.constructor.name,\n propertyName\n )\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[classId].find({\n _id: this.id(),\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = JSON.stringify(component[propertyName])\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n if (value === null) {\n realVal = value\n } else {\n realVal = value.id()\n }\n break\n case propertyType === 'date':\n if (typeof value === 'string') {\n realVal = value\n } else {\n realVal = value.toISOString()\n component[propertyName] = value.toISOString()\n }\n break\n default:\n realVal = value\n break\n }\n\n component[propertyName] = realVal\n\n if ($history.isEnabled() && classId.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: JSON.stringify(realVal),\n oldValue: oldValue,\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: classId,\n id: this.id(),\n field: propertyName,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(this.id())\n }\n\n $workflow.process({\n component: this.id(),\n state: propertyName,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n this.id(),\n this.constructor.name,\n propertyName,\n value,\n propertyType\n )\n }\n }\n }\n }\n Class.prototype[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addStructure\n * @param {String} path parent path\n * @param {String} name property name\n * @param {String} model model name\n * @param {String} id id of the component\n * @returns {Object} object that cointains methods to access the structure\n * @private\n * @description Add structure properties to a component.\n * All these properties will be accessed by a method with the same name.\n * Some checks can be done in order to see if the set of properties is compliant with the model.\n */\nfunction addStructure(path, name, model, id) {\n let properties = getStructureProperties(\n path ? path + '.' + name : name,\n model\n )\n let sructure = undefined\n\n if (getStructureValue(model, id, path ? path + '.' + name : name)) {\n sructure = {}\n properties.forEach(function property(prop) {\n let proxy = {}\n let propertyName = ''\n let propertyType = ''\n let propertyReadOnly = ''\n\n propertyName = prop.name\n propertyType = prop.type\n propertyReadOnly = prop.readOnly\n\n if (Array.isArray(propertyType) || propertyType === 'array') {\n // in case of array, return a sub array\n proxy = function proxy(position, value) {\n let search = []\n let component = null\n let runtimeArr = null\n let val = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n\n function _isValidCollection(coll, type) {\n let result = true\n\n coll.forEach(function (val) {\n if (!$metamodel.isValidType(val, type)) {\n result = result && false\n }\n })\n\n return result\n }\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n if (typeof position === 'undefined') {\n runtimeArr = new _Array({\n id: id,\n propertyName: fullPath,\n readOnly: propertyReadOnly,\n classId: model,\n type: Array.isArray(propertyType) ? propertyType[0] : 'any',\n arr: getStructureValue(model, id, fullPath),\n })\n\n return runtimeArr\n } else {\n if (Array.isArray(position)) {\n // we replace the collection\n if (\n _isValidCollection(\n position,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, position)\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [position, 'reset'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [position, 'reset'],\n })\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify([]),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: position,\n })\n }\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n propertyType[0]\n )\n }\n } else {\n if (typeof position === 'number') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n val = get(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n val = new Date(\n getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n )\n return val\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'json':\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n val = JSON.parse(JSON.stringify(val))\n return val\n case $metamodel.isStructure(fullPath, model):\n val = addStructure(\n parentPath,\n propertyName + '[' + position + ']',\n model,\n id\n )\n return val\n default:\n val = getStructureValue(\n model,\n id,\n fullPath + '[' + position + ']'\n )\n return val\n }\n } else {\n $log.destroyedComponentCall(\n fullPath[position] + '[' + position + ']',\n id\n )\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n position,\n 'number'\n )\n }\n }\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, this.constructor.name, propertyName)\n } else {\n if (\n $metamodel.isValidType(\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n ) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n let arr = getStructureValue(model, id, fullPath)\n if (typeof arr === 'undefined') {\n arr = []\n }\n\n switch (true) {\n case $metamodel.inheritFrom(\n value.constructor.name,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ) &&\n $metamodel.isClassName(\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n ):\n arr[position] = value.id()\n break\n case Array.isArray(propertyType)\n ? propertyType[0]\n : 'any' === 'date':\n arr[position] = value.toISOString()\n break\n default:\n arr[position] = value\n break\n }\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n setStructureValue(model, id, fullPath, arr)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(value),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if ($helper.isRuntime()) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: arr,\n })\n }\n\n // all element\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value, 'add'],\n })\n }\n\n // current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value, 'add'],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n this.constructor.name,\n propertyName,\n value,\n Array.isArray(propertyType) ? propertyType[0] : 'any'\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (position, value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n proxy = function proxy(value) {\n let search = []\n let component = null\n let propertyValue = null\n let parentPath = ''\n let fullPath = ''\n let oldValue = null\n let realVal = null\n\n if (path) {\n parentPath = path + '.' + name\n } else {\n parentPath = name\n }\n fullPath = parentPath + '.' + propertyName\n\n if (typeof value === 'undefined') {\n component = $db.store[model][id]\n if (component) {\n switch (true) {\n case $metamodel.isClassName(propertyType):\n propertyValue = get(getStructureValue(model, id, fullPath))\n break\n case propertyType === 'date':\n propertyValue = new Date(\n getStructureValue(model, id, fullPath)\n )\n break\n case propertyType === 'json':\n propertyValue = getStructureValue(model, id, fullPath)\n propertyValue = JSON.parse(JSON.stringify(propertyValue))\n break\n case $metamodel.isStructure(fullPath, model):\n propertyValue = addStructure(\n parentPath,\n propertyName,\n model,\n id\n )\n break\n default:\n propertyValue = getStructureValue(model, id, fullPath)\n break\n }\n if (propertyValue === undefined && prop.default !== undefined) {\n propertyValue = prop.default\n }\n return propertyValue\n } else {\n $log.destroyedComponentCall(fullPath, id)\n }\n } else {\n if (propertyReadOnly) {\n $log.readOnlyProperty(id, model, fullPath)\n } else {\n if ($metamodel.isValidType(value, propertyType)) {\n search = $db.collections[model].find({\n _id: id,\n })\n if (search.length) {\n component = search[0]\n\n if ($history.isEnabled()) {\n oldValue = getStructureValue(model, id, fullPath)\n }\n\n switch (true) {\n case $metamodel.isClassName(propertyType):\n realVal = value.id()\n break\n case propertyType === 'date':\n realVal = value.toISOString()\n break\n default:\n realVal = value\n break\n }\n\n setStructureValue(model, id, fullPath, realVal)\n\n if ($history.isEnabled() && model.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: model,\n id: id,\n field: fullPath,\n value: JSON.stringify(realVal),\n oldValue: JSON.stringify(oldValue),\n })\n }\n\n if (\n $helper.isRuntime() &&\n $helper.getRuntime().require('db')\n ) {\n $helper.getRuntime().require('db').update({\n collection: model,\n id: id,\n field: fullPath,\n value: realVal,\n })\n }\n\n // case of _Behavior\n if (model === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n\n // all elements\n if (fullPath.indexOf('[') !== -1) {\n $workflow.process({\n component: id,\n state: fullPath.replace(/\\[(\\d)*\\]/g, ''),\n data: [value],\n })\n }\n\n // the current element\n $workflow.process({\n component: id,\n state: fullPath,\n data: [value],\n })\n }\n } else {\n $log.invalidPropertyName(\n id,\n model,\n fullPath,\n value,\n propertyType\n )\n }\n }\n }\n }\n\n sructure[propertyName] = new Function(\n '__proxy',\n 'return function ' +\n propertyName +\n ' (value) { return __proxy.apply(this, arguments) };'\n )(proxy)\n }\n })\n }\n\n return sructure\n}\n\n/**\n * @method addMethods\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add methods to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts / outputs are compliant with the model.\n */\nfunction addMethods(model, Class, classId) {\n let methods = getMethods(model)\n\n methods.forEach(function method(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n let paramsWithContext = ''\n\n let proxy = function proxy() {\n let result = null\n\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n\n return result\n }\n\n let proxyWithContext = function proxy() {\n let result = null\n let data = Array.prototype.slice.call(arguments)\n\n data.shift()\n\n if (arguments[0]) {\n result = $workflow.process({\n component: this.id(),\n state: methodName,\n data: data,\n context: arguments[0],\n })\n } else {\n $log.unknownContext(classId, methodName)\n }\n\n return result\n }\n\n if (params) {\n paramsName.unshift('context')\n paramsWithContext = paramsName.join(', ')\n\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n paramsWithContext +\n ') { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n if (methodName !== 'name') {\n Class[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (context) { return __proxy.apply(this, arguments) };'\n )(proxyWithContext)\n }\n }\n })\n}\n\n/**\n * @method addEvents\n * @param {String} model model name\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add events to a component.\n * The call to these methods will invoke the workflow in order to check that inpouts are compliant with the model.\n */\nfunction addEvents(model, Class, classId) {\n let events = getEvents(model)\n events.forEach(function event(methodName) {\n let paramsName = getParamNames(classId, methodName)\n let params = paramsName.join(', ')\n\n let proxy = function proxy() {\n let systems = []\n let systemId = 'e89c617b6b15d24'\n let data = []\n let i = 0\n let length = -1\n let message = {}\n\n if (classId === '_Channel') {\n systems = $db.collections._System.find({\n master: true,\n })\n if (systems.length) {\n systemId = systems[0][$mson.ID]\n }\n\n message.from = systemId\n length = arguments.length\n for (i = 0; i < length; i++) {\n data.push(arguments[i])\n }\n message.data = data\n message.event = methodName\n\n $db.collections._Message.insert(message)\n\n $workflow.process({\n component: this.id(),\n state: 'send',\n data: [\n {\n event: message.event,\n from: message.from,\n data: message.data,\n },\n ],\n })\n } else {\n $workflow.process({\n component: this.id(),\n state: methodName,\n data: arguments,\n })\n }\n }\n if (params) {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' +\n methodName +\n ' (' +\n params +\n ') { return __proxy.apply(this, arguments) };'\n )(proxy)\n } else {\n Class.prototype[methodName] = new Function(\n '__proxy',\n 'return function ' + methodName + ' () { return __proxy.apply(this) };'\n )(proxy)\n }\n })\n}\n\n/**\n * @method addOn\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a component to add behaviors to the component\n */\nfunction addOn(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.prototype.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOnClass\n * @param {Function} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a on method to a class component to add behaviors to the class\n */\nfunction addOnClass(Class, classId) {\n let proxy = function proxy(state, action, useCoreAPI, isCore) {\n let behaviorId = ''\n let currentState = ''\n let context = null\n\n // case of context\n if (\n useCoreAPI &&\n useCoreAPI.constructor &&\n useCoreAPI.constructor.name !== 'Boolean'\n ) {\n context = useCoreAPI\n useCoreAPI = false\n isCore = true\n }\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'on',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n if (\n !$metamodel.isEvent(state, classId) &&\n !$metamodel.isProperty(state, classId) &&\n !$metamodel.isLink(state, classId) &&\n !$metamodel.isCollection(state, classId) &&\n $db.collections._Behavior.find({\n component: this.id(),\n state: state,\n }).length >= 1\n ) {\n $log.behaviorNotUnique(classId, state)\n } else {\n if ($workflow.checkInputNumbers(classId, state, action)) {\n behaviorId = $behavior.add(\n this.id(),\n state,\n action,\n useCoreAPI,\n isCore,\n context\n )\n\n currentState = $state.get(this.id())\n if (currentState && currentState.state === state) {\n $workflow.process({\n id: behaviorId,\n data: currentState.value,\n })\n }\n } else {\n $log.invalidParamNumberMethodOn(\n this.id(),\n this.constructor.name,\n state\n )\n }\n }\n } else {\n $log.invalidStateOn(classId, state)\n }\n }\n return behaviorId\n }\n Class.on = new Function(\n '__proxy',\n 'return function on (state, action, useCoreAPI, isCore) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addOffClass\n * @param {Object} Class Class\n * @param {String} classId name of the class\n * @private\n * @description Add a off method to a class component to remove behaviors from the class\n */\nfunction addOffClass(Class, classId) {\n let proxy = function proxy(state, behaviorId) {\n if (\n $workflow.checkInput({\n component: this,\n methodName: 'off',\n args: arguments,\n })\n ) {\n if ($metamodel.isValidState(state, classId)) {\n $behavior.remove({\n behaviorId: behaviorId,\n componentId: classId,\n state: state,\n })\n } else {\n $log.invalidStateOff(classId, state)\n }\n }\n }\n Class.off = new Function(\n '__proxy',\n 'return function off (state, behaviorId) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addDestroyClass\n * @param {Object} Class Class\n * @private\n * @description Add a destroy method to a class component to detroy the class and all the components of the same class\n */\nfunction addDestroyClass(Class) {\n let proxy = function proxy() {\n let id = this.id()\n let result = []\n let i = 0\n let length = 0\n\n // if not virtual component\n if ($db.collections[id]) {\n result = $db.collections[id].remove()\n }\n\n delete store[id]\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n length = result.length\n for (i = 0; i < length; i++) {\n // remove behaviors\n $behavior.remove({\n componentId: result[i],\n })\n }\n\n $workflow.process({\n component: id,\n state: 'destroy',\n })\n }\n Class.destroy = new Function(\n '__proxy',\n 'return function destroy () { return __proxy.apply(this) };'\n )(proxy)\n}\n\n/**\n * @method addRequireClass\n * @param {Object} Class Class\n * @private\n * @description Require a component\n */\nfunction addRequireClass(Class) {\n let proxy = function proxy(id) {\n return get(id)\n }\n Class.require = new Function(\n '__proxy',\n 'return function require (id) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method addInitClass\n * @param {Object} Class Class\n * @private\n * @description Init a class\n */\nfunction addInitClass(Class) {\n let proxy = function proxy() {}\n Class.init = new Function(\n '__proxy',\n 'return function init (conf) { return __proxy.apply(this, arguments) };'\n )(proxy)\n}\n\n/**\n * @method factory\n * @param {JSON} config configuration of the component\n * @returns {Component} the created component\n * @private\n * @description Create a component from its configuration\n */\nfunction factory(config) {\n config = config || {}\n\n let Class = {}\n let classId = ''\n\n if (typeof config.model === 'undefined') {\n classId = $helper.generateId()\n } else {\n classId = config.model\n }\n\n Class = createClass(classId)\n\n store[classId] = Class\n\n addIdClass(Class, classId)\n\n addProperties(config.model, Class, classId)\n addMethods(config.model, Class, classId)\n addEvents(config.model, Class, classId)\n\n // add default properties/methods only if the component\n // inherit from _Component\n if ($metamodel.inheritFrom(classId, '_Component')) {\n addOn(Class, classId)\n\n addOnClass(Class, classId)\n addOffClass(Class, classId)\n addRequireClass(Class)\n addInitClass(Class)\n addDestroyClass(Class)\n }\n\n Object.freeze(Class)\n\n return Class\n}\n\n/* Public methods */\n\n/**\n * @method get\n * @param {String} id of the component\n * @returns {Component} component\n * @description Get a component by its id\n */\nfunction get(id) {\n return store[id]\n}\n\n/**\n * @method create\n * @param {Object} config
\n * {String} model model name
\n * @returns {Component}\n * @description Create a component from its configuration\n */\nfunction create(config) {\n return factory(config)\n}\n\n/**\n * @method destroy\n * @param {String} id id of the component to destroy\n * @description Destroy a component from its id\n */\nfunction destroy(id) {\n let component = store[id]\n let classId = ''\n\n if (component) {\n delete store[id]\n classId = component.constructor.name\n $db.collections[classId].remove({\n _id: id,\n })\n\n // remove behaviors\n $behavior.remove({\n componentId: id,\n })\n\n // case of Behavior\n if (classId === '_Behavior') {\n $behavior.removeFromMemory(id)\n }\n }\n}\n\n/**\n * @method removeFromMemory\n * @param {String} id id of the component\n * @description Remove a component with its id from the memory\n */\nfunction removeFromMemory(id) {\n delete store[id]\n}\n\n/**\n * @method clear\n * @description Remove all the components store in the memory\n */\nfunction clear() {\n store = {}\n}\n\nexport default {\n get,\n create,\n destroy,\n removeFromMemory,\n clear,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module db\n * @requires component\n * @requires metamodel\n * @requires helper\n * @requires log\n * @requires behavior\n * @requires state\n * @requires workflow\n * @requires mson\n * @requires history\n * @description This module manages System Runtime database.\n * System Runtime database is a micro NoSQL Database that contains:\n * - collections to store documents (schemas, types, components, ...) and\n * - APIs to import or export documents.\n *\n * System Runtime Database is closely linked to System Runtime metamodel and System Runtime components because:\n * - all operations done by System Runtime database must be compliant with the model before being finished,\n * - insert operation automatically creates a component and\n * - remove operation automatically destroy a component.\n */\n\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $helper from './helper.js'\nimport $log from './log.js'\nimport $history from './history.js'\nimport $behavior from './behavior.js'\nimport $state from './state.js'\nimport $workflow from './workflow.js'\nimport $mson from './mson.js'\n\n/* Private properties */\n\nlet collectionNames = []\nlet internalDB = [\n '_Runtime',\n '_Schema',\n '_GeneratedSchema',\n '_Model',\n '_GeneratedModel',\n '_Behavior',\n '_Type',\n '_Metamodel',\n '_Database',\n '_System',\n '_Message',\n '_Channel',\n '_Logger',\n '_History',\n]\nlet coreDb = [\n '_Schema',\n '_GeneratedSchema',\n '_Logger',\n '_Model',\n '_GeneratedModel',\n '_Type',\n '_History',\n]\n\n/* Private methods */\n\n/**\n * @method dump\n * @returns {Object} the dump of the database. The dump is an object that contains:
\n * {Object} schemas the schemas store in the database
\n * {Object} types the types store in the database
\n * {Object} behaviors the behaviors store in the database
\n * {Object} components the components store in the database\n * @private\n * @description Dump the database\n */\nfunction dump() {\n let dbDump = {}\n let collectionName = ''\n let behaviorId = ''\n let typeId = ''\n let type = null\n let behavior = null\n let schema = null\n let model = null\n let collection = null\n let schemaId = ''\n let modelId = ''\n let length = 0\n let i = 0\n let id = ''\n\n // schemas\n dbDump.schemas = {}\n if (collections._Schema.count()) {\n for (schemaId in store._Schema) {\n if (!store._Schema[schemaId][$mson.CORE]) {\n schema = JSON.parse(JSON.stringify(store._Schema[schemaId]))\n dbDump.schemas[schemaId] = schema\n }\n }\n }\n\n // models\n dbDump.models = {}\n if (collections._Model.count()) {\n for (modelId in store._Model) {\n if (!store._Model[modelId][$mson.CORE]) {\n model = JSON.parse(JSON.stringify(store._Model[modelId]))\n dbDump.models[modelId] = model\n }\n }\n }\n\n // types\n dbDump.types = {}\n if (collections._Type.count()) {\n for (typeId in store._Type) {\n if (!store._Type[typeId].core) {\n type = JSON.parse(JSON.stringify(store._Type[typeId]))\n dbDump.types[type.name] = type\n }\n }\n }\n\n // behaviors\n dbDump.behaviors = {}\n for (behaviorId in store._Behavior) {\n if (!store._Behavior[behaviorId].core) {\n behavior = JSON.parse(JSON.stringify(store._Behavior[behaviorId]))\n dbDump.behaviors[behaviorId] = behavior\n }\n }\n\n // components\n dbDump.components = {}\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n if (collections[collectionName].count()) {\n collection = JSON.parse(JSON.stringify(store[collectionName]))\n\n for (id in collection) {\n if (collection[id][$mson.CORE]) {\n delete collection[id]\n }\n }\n\n if (Object.keys(collection).length) {\n dbDump.components[collectionName] = collection\n }\n }\n }\n\n return dbDump\n}\n\n/**\n * @class _Array\n * @private\n * @description Sub class to override sort method of Array Class\n */\nfunction _Array() {\n let arr = []\n\n /**\n * @method sort\n * @param {Function|Object} param the sort function or the sort query\n * @returns {Array} the sorted array\n * @description Override sort method\n */\n arr.sort = function sort(param) {\n let field = ''\n let arrCopy = []\n\n // copy\n arr.forEach(function (val) {\n arrCopy.push(val)\n })\n\n if (param instanceof Function) {\n arrCopy.sort(param)\n } else {\n field = Object.keys(param)[0]\n arrCopy.sort(function (docA, docB) {\n if (docA[field] < docB[field]) {\n return param[field] === 1 ? -1 : 1\n }\n if (docA[field] > docB[field]) {\n return param[field] === 1 ? 1 : -1\n }\n return 0\n })\n }\n\n return arrCopy\n }\n\n return arr\n}\n\n_Array.prototype = []\n\n/**\n * @method isValidWithSelectors\n * @param {Object} field field on which made the search\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query used for the search is valid with the document\n * @private\n * @description Test if the query used for the search is valid with the document\n */\nfunction isValidWithSelectors(field, query, document) {\n let result = true\n let selector = ''\n\n search: for (selector in query) {\n switch (true) {\n case selector === '$eq':\n if (query[selector] instanceof RegExp) {\n if (document[field].toString().match(query[selector]) === null) {\n result = false\n break search\n }\n } else {\n if (document[field] !== query[selector]) {\n result = false\n break search\n }\n }\n break\n case selector === '$gt':\n if (document[field] <= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$gte':\n if (document[field] < query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lt':\n if (document[field] >= query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$lte':\n if (document[field] > query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$ne':\n if (document[field] === query[selector]) {\n result = false\n break search\n }\n break\n case selector === '$in':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) === -1\n ) {\n result = false\n break search\n }\n break\n case selector === '$nin':\n if (\n Array.isArray(query[selector]) &&\n query[selector].indexOf(document[field]) !== -1\n ) {\n result = false\n break search\n }\n break\n default:\n break\n }\n }\n return result\n}\n\n/**\n * @method isValid\n * @param {Object} query query object\n * @param {Object} document document object\n * @returns {Boolean} true if the query of search is valid with the document\n * @private\n * @description Test if the query of search is valid with the document\n */\nfunction isValid(query, document) {\n let result = true\n let findInArray = false\n let field = ''\n let i = 0\n let length = 0\n\n search: for (field in query) {\n if (typeof document[field] !== 'undefined') {\n switch (true) {\n // regular expression\n case query[field] instanceof RegExp:\n if (Array.isArray(document[field]) && !Array.isArray(query[field])) {\n length = document[field].length\n for (i = 0; i < length; i++) {\n if (document[field][i].toString().match(query[field]) !== null) {\n findInArray = true\n break search\n }\n }\n result = findInArray\n } else {\n if (document[field].toString().match(query[field]) === null) {\n result = false\n break search\n }\n }\n break\n\n // query selectors\n case query[field] instanceof Object && !Array.isArray(query[field]):\n result = isValidWithSelectors(field, query[field], document)\n break\n\n // multiple query\n case Array.isArray(document[field]) && !Array.isArray(query[field]):\n if (document[field].indexOf(query[field]) === -1) {\n result = false\n break search\n }\n break\n\n // simple query\n default:\n if (document[field] !== query[field]) {\n result = false\n break search\n }\n break\n }\n } else {\n result = false\n break\n }\n }\n return result\n}\n\n/**\n * @method impSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @private\n * @description Import system into the database\n */\nfunction impSystem(importedSystem) {\n let result = ''\n let collectionName = ''\n let componentId = ''\n let typeName = ''\n let schemaName = ''\n let modelName = ''\n let behaviorId = ''\n let systems = []\n\n if (importedSystem) {\n // add types\n for (typeName in importedSystem.types) {\n $metamodel.type(importedSystem.types[typeName])\n }\n\n // add schemas\n for (schemaName in importedSystem.schemas) {\n $metamodel.schema(importedSystem.schemas[schemaName])\n }\n\n // add models\n for (modelName in importedSystem.models) {\n $metamodel.model(importedSystem.models[modelName])\n }\n\n $metamodel.create()\n\n // add behaviors\n for (behaviorId in importedSystem.behaviors) {\n collections._Behavior.insert(importedSystem.behaviors[behaviorId])\n }\n\n $log.initDb()\n\n // add components\n for (collectionName in importedSystem.components) {\n for (componentId in importedSystem.components[collectionName]) {\n collections[collectionName].insert(\n importedSystem.components[collectionName][componentId]\n )\n }\n }\n\n // reset info if already a master system\n systems = collections._System.find({\n master: true,\n })\n if (systems.length) {\n if (systems[0][$mson.ID] === importedSystem[$mson.ID]) {\n importedSystem.master = true\n } else {\n if (importedSystem.master) {\n systems[0].master = false\n }\n }\n }\n\n // insert the system in DB\n collections._System.insert(importedSystem)\n\n result = importedSystem[$mson.ID]\n }\n\n return result\n}\n\n/**\n * @method expSystem\n * @returns {String} a stringified system\n * @private\n * @description Export a system from the database\n */\nfunction expSystem() {\n let result = ''\n let collectionName = ''\n let systems = []\n let id = null\n let dbDump = null\n let mastersystem = null\n let exportedSystem = {}\n\n // get id of the master system\n systems = collections._System.find({\n master: true,\n })\n\n if (systems.length) {\n mastersystem = systems[0]\n id = mastersystem[$mson.ID]\n\n // prop\n exportedSystem[$mson.ID] = id\n exportedSystem.name = mastersystem.name\n exportedSystem.description = mastersystem.description\n exportedSystem.version = mastersystem.version\n exportedSystem.master = true\n\n // dump\n dbDump = dump()\n for (collectionName in dbDump) {\n if (dbDump.hasOwnProperty(collectionName)) {\n exportedSystem[collectionName] = dbDump[collectionName]\n }\n }\n\n result = JSON.stringify(exportedSystem)\n } else {\n result = '{}'\n $log.masterSystemNotFound()\n }\n\n return result\n}\n\n/**\n * @method exportSubsystem\n * @param {JSON} params parameters\n * @returns {String} a stringified sub-system\n * @private\n * @description Export a sub-system\n */\nfunction expSubsystem(params) {\n let system = {}\n let result = []\n let defaultName = ''\n let i = 0\n let length = 0\n let schema = null\n let type = null\n let model = null\n let behavior = null\n let component = null\n let className = ''\n\n // default values\n result = collections._System.find({\n master: true,\n })\n if (result.length) {\n defaultName = result[0].name\n }\n\n system.name = params.name || 'sub_' + defaultName\n system.version = params.version || '0.0.1'\n system.description = params.description || ''\n\n // schemas\n system.schemas = {}\n if (params.schemas) {\n result = collections._Schema.find(params.schema)\n\n length = result.length\n for (i = 0; i < length; i++) {\n schema = result[i]\n if (!schema[$mson.CORE]) {\n system.schemas[schema[$mson.ID]] = schema\n }\n }\n }\n\n // models\n system.models = {}\n if (params.models) {\n result = collections._Model.find(params.models)\n\n length = result.length\n for (i = 0; i < length; i++) {\n model = result[i]\n if (!model[$mson.CORE]) {\n system.models[model[$mson.ID]] = model\n }\n }\n }\n\n // types\n system.types = {}\n if (params.types) {\n result = collections._Type.find(params.types)\n\n length = result.length\n for (i = 0; i < length; i++) {\n type = result[i]\n if (!type[$mson.CORE]) {\n system.types[type[$mson.ID]] = type\n }\n }\n }\n\n // behaviors\n system.behaviors = {}\n if (params.behaviors) {\n behavior = collections._Behavior.find(params.behaviors)\n\n length = result.length\n for (i = 0; i < length; i++) {\n behavior = result[i]\n if (!behavior.core) {\n system.behaviors[behavior[$mson.ID]] = behavior\n }\n }\n }\n\n // components\n system.components = {}\n if (params.components) {\n for (className in params.components) {\n if (collections[className]) {\n system.components[className] = {}\n\n result = collections[className].find(params.components[className])\n length = result.length\n for (i = 0; i < length; i++) {\n component = result[i]\n system.components[className][component[$mson.ID]] = component\n }\n }\n }\n }\n\n return JSON.stringify(system)\n}\n\n/* Public properties */\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst store = {}\n\n/**\n * @property {JSON} store\n * @description System Runtime database store that lists all the collections\n */\nconst collections = {}\n\n/* Public methods */\n\n/**\n * @class DatabaseCollection\n * @constructor\n * @param {String} name name of the new collection\n * @@description A collection of documents managed by System Runtime.\n * Internal collections manage core objects of System Runtime (schema, type, ...).\n * Public collections manage components of the same class.\n */\nlet DatabaseCollection = function DatabaseCollection(name) {\n if ($metamodel.getSchema(name) || internalDB.indexOf(name) !== -1) {\n store[name] = {}\n this.name = name\n if (internalDB.indexOf(name) === -1) {\n collectionNames.push(name)\n }\n } else {\n $log.invalidCollectionName(name)\n }\n}\n\n/**\n * @method find\n * @param {Object|Array} query\n * @returns {Array} Array of documents that map the query\n * @description Find a document into the collection\n *\n * @example\n * $db.collections.Person.find({'name': 'laure'});\n * $db.collections.Person.find({'name': 'laure', 'age' : 24});\n * $db.collections.Person.find([{'name': 'rene'}, {'name': 'robert'}]);\n */\nDatabaseCollection.prototype.find = function find(query) {\n let result = new _Array()\n let resultId = {}\n let id = ''\n let document = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiSearch(criteria) {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(criteria, document)) {\n if (typeof resultId[id] === 'undefined') {\n result.push(document)\n resultId[id] = true\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n if (isValid(query, document)) {\n result.push(document)\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n document = store[this.name][id]\n result.push(document)\n }\n }\n\n return result\n}\n\n/**\n * @method insert\n * @param {Object|Array} document a new object to add\n * @returns {Array} array of id created\n * @description Insert an new document into the collection.\n * Before inserting the document, System Runtime checks that the document is compliant\n * with its class definition.\n * Then, after inserting it, we create the component.\n *\n * @example\n * $db.collections.Person.insert({\n * 'name': 'bob',\n * 'firstName': 'Saint-Clar',\n * 'age': 43\n * });\n */\nDatabaseCollection.prototype.insert = function insert(document) {\n let doc = []\n let Component = null\n let result = []\n\n if (Array.isArray(document)) {\n doc = document\n } else {\n doc.push(document)\n }\n\n doc.forEach(\n function multiInsert(obj) {\n let channels = []\n\n switch (true) {\n case obj === null:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n case this.name === '_Schema':\n case this.name === '_Logger':\n case this.name === '_Model':\n case this.name === '_Type':\n case this.name === '_GeneratedModel':\n case this.name === '_GeneratedSchema':\n case $metamodel.isValidObject(obj, $metamodel.getModel(this.name)):\n if (typeof obj[$mson.ID] === 'undefined') {\n obj[$mson.ID] = $helper.generateId()\n }\n\n $metamodel.prepareObject(obj, $metamodel.getModel(this.name))\n\n store[this.name][obj[$mson.ID]] = obj\n\n result.push(obj[$mson.ID])\n\n Component = $component.get(this.name)\n if (Component) {\n new Component(obj)\n } else {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'insert',\n collection: this.name,\n id: obj[$mson.ID],\n value: JSON.stringify(obj),\n })\n }\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').insert({\n collection: this.name,\n document: obj,\n })\n }\n }\n\n if (this.name === '_Message') {\n if ($helper.isRuntime()) {\n channels = collections._Channel.find({})\n let length = channels.length\n for (let i = 0; i < length; i++) {\n $helper.getRuntime().require(channels[i][$mson.ID])\n $workflow.process({\n component: channels[i][$mson.ID],\n state: obj.event,\n data: obj.data,\n })\n }\n }\n }\n\n break\n default:\n $log.invalidDocumentOnDbInsert(obj, this.name)\n break\n }\n }.bind(this)\n )\n\n return result\n}\n\n/**\n * @method update\n * @param {Object|Array} query query to find the documents to update\n * @param {Object} update update to make\n * @param {Object} options\n * {Boolean} upsert true if we create a document when no document is found by the query\n * @returns {Array} array of id of updated documents\n * @description Update documents into a collection\n *\n * @example\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'});\n * $db.collections.Cars.update([{'code': 'AZD-71'}, {'code': 'AZD-65'}], {'price': '10000$'});\n * $db.collections.Cars.update({'code': 'AZD-71'}, {'price': '10000$'}, {'upsert': true});\n */\nDatabaseCollection.prototype.update = function update(query, update, options) {\n let docs = this.find(query)\n let result = []\n let i = 0\n let length = docs.length\n let attributeName = ''\n let schema = $metamodel.getModel(this.name)\n let type = ''\n let createdDocumentId = []\n\n options = options || {}\n if (typeof options.upsert === 'undefined') {\n options.upsert = options.upsert || false\n }\n\n if (update) {\n // upsert case\n if (length === 0 && options.upsert) {\n if (query[$mson.ID]) {\n update[$mson.ID] = query[$mson.ID]\n }\n createdDocumentId = this.insert(update)\n if (createdDocumentId.length === 1) {\n result.push(createdDocumentId[0])\n }\n }\n\n for (i = 0; i < length; i++) {\n // case of update of _id\n if (\n typeof update[$mson.ID] !== 'undefined' &&\n update[$mson.ID] !== docs[i][$mson.ID]\n ) {\n $log.updateUuid(\n docs[i][$mson.ID],\n update[$mson.ID],\n typeof $component.get(update[$mson.ID]) !== 'undefined'\n )\n }\n\n for (attributeName in update) {\n if (typeof docs[i][attributeName.split('.')[0]] !== 'undefined') {\n if (\n this.name !== '_Schema' &&\n this.name !== '_GeneratedSchema' &&\n this.name !== '_Model' &&\n this.name !== '_GeneratedModel'\n ) {\n // check type\n type = ''\n if (attributeName.indexOf('_') !== 0) {\n if (attributeName.indexOf('.') !== -1) {\n type = $metamodel.getModelPathType(this.name, attributeName)\n } else {\n type = schema[attributeName].type\n }\n } else {\n if ($mson.SCHEMA_DEFINITION[attributeName]) {\n type = $mson.SCHEMA_DEFINITION[attributeName].type\n }\n }\n if (type) {\n if ($metamodel.isValidType(update[attributeName], type, true)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n if (type === 'array') {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName], 'reset'],\n })\n } else {\n $workflow.process({\n component: docs[i][$mson.ID],\n state: attributeName,\n data: [update[attributeName]],\n })\n }\n } else {\n $log.invalidPropertyTypeOnDbUpdate(\n this.name,\n docs[i][$mson.ID],\n attributeName,\n update[attributeName],\n type\n )\n }\n } else {\n $log.unknownPropertyOnDbUpdate(\n this.name,\n attributeName,\n docs[i][$mson.ID]\n )\n }\n } else {\n // TODO more check in case of schema update\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'update',\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: JSON.stringify(update[attributeName]),\n oldValue: JSON.stringify(docs[i][attributeName]),\n })\n }\n\n docs[i][attributeName] = update[attributeName]\n\n result.push(docs[i][$mson.ID])\n\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').update({\n collection: this.name,\n id: docs[i][$mson.ID],\n field: attributeName,\n value: update[attributeName],\n })\n }\n }\n }\n }\n }\n }\n\n return result\n}\n\n/**\n * @method remove\n * @param {Object|Array} query query to find the documents to remove\n * @returns {Array} list of documents id removed\n * @description Remove a document from the collection.\n * When a document is removed, the component is destroyed.\n *\n * @example\n * $db.collections.Cars.remove({'code': 'AZD-71'});\n * $db.collections.Cars.remove([{'code': 'AZD-71'}, {'code': 'AZD-65'}]);\n */\nDatabaseCollection.prototype.remove = function remove(query) {\n let result = []\n let id = ''\n let component = null\n let object = {}\n\n query = query || null\n\n if (query && Object.keys(query).length) {\n if (Array.isArray(query)) {\n query.forEach(\n function multiRemove(criteria) {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(criteria, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }.bind(this)\n )\n } else {\n for (id in store[this.name]) {\n object = store[this.name][id]\n\n if (isValid(query, object)) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n result.push(id)\n\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n }\n }\n }\n } else {\n for (id in store[this.name]) {\n if ($history.isEnabled() && this.name.indexOf('_') !== 0) {\n $history.pushState({\n action: 'remove',\n collection: this.name,\n id: id,\n oldValue: JSON.stringify(store[this.name][id]),\n })\n }\n\n delete store[this.name][id]\n\n if (coreDb.indexOf(this.name) === -1) {\n component = $component.get(id)\n if (component) {\n component.destroy()\n }\n }\n if ($helper.isRuntime() && $helper.getRuntime().require('db')) {\n $helper.getRuntime().require('db').remove({\n collection: this.name,\n id: id,\n })\n }\n result.push(id)\n }\n }\n\n return result\n}\n\n/**\n * @method count\n * @returns {Number} number of documents in the collection\n * @description Count the number of documents in the collection\n */\nDatabaseCollection.prototype.count = function count() {\n return store[this.name] ? Object.keys(store[this.name]).length : 0\n}\n\n/* Public methods */\n\n/**\n * @method collection\n * @param {String} name of the collection\n * @description Create a new DatabaseCollection\n */\nfunction collection(name) {\n collections[name] = new DatabaseCollection(name)\n}\n\n/**\n * @method importSystem\n * @param {JSON} importedSystem a System Runtime system to import\n * @returns {String} the id of the imported System Runtime system\n * @description Import a system into the database\n */\nfunction importSystem(importedSystem) {\n return impSystem(importedSystem)\n}\n\n/**\n * @method exportSystem\n * @param {JSON} params parameters\n * @returns {String} a stringified system\n * @description Export a system\n *\n * @example\n * $db.exportSystem(); // export all the system\n * $db.exportSystem({'schemas':{'name':'Person'}}); // filter export on schemas\n * $db.exportSystem({'types':{'name':'address'}}); // filter export on types\n * $db.exportSystem({'behaviors':{'component':'laure'}}); // filter export on behaviors\n * $db.exportSystem({'components':{'Person': {'country': 'France'}}}); // filter export on components\n * $db.exportSystem({'schemas':{'name':'Person'},'components':{'Person': {'country': 'France'}}}); // combine filters\n */\nfunction exportSystem(params) {\n let result = ''\n\n if (params) {\n result = expSubsystem(params)\n } else {\n result = expSystem()\n }\n return result\n}\n\n/**\n * @method clear\n * @description Clear the database\n */\nfunction clear() {\n let length = 0\n let i = 0\n let collectionName = ''\n\n // remove collections\n length = collectionNames.length\n for (i = 0; i < length; i++) {\n collectionName = collectionNames[i]\n collections[collectionName].remove()\n }\n\n // remove internal collections\n length = internalDB.length\n for (i = 0; i < length; i++) {\n collectionName = internalDB[i]\n collections[collectionName].remove()\n }\n}\n\n/**\n * @method init\n * @description Init the database\n */\nfunction init() {\n let runtimeSystemId = ''\n let runtimeSystem = null\n\n runtimeSystem = collections._System.find({\n _id: 'e89c617b6b15d24',\n })[0]\n\n // clear all the data in memory\n clear()\n $component.clear()\n $metamodel.clear()\n $state.clear()\n $behavior.clear()\n $history.clear()\n\n // init metamodel\n $metamodel.init()\n\n // reimport System Runtime core system\n runtimeSystemId = importSystem(runtimeSystem)\n $component.get(runtimeSystemId).start()\n}\n\nexport default {\n store,\n collection,\n collections,\n importSystem,\n exportSystem,\n clear,\n init,\n}\n","/*\n * System Runtime\n *\n * https://designfirst.io/systemruntime/\n *\n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module runtime\n * @requires db\n * @requires component\n * @requires metamodel\n * @requires system\n * @requires helper\n * @description This module is the main module of System Runtime.\n * It inits System Runtime metamodel and loads System Runtime core system.\n */\n\nimport $db from './db.js'\nimport $component from './component.js'\nimport $metamodel from './metamodel.js'\nimport $system from './system.js'\n\n/* Private Property */\n\nlet sytemId = ''\nlet system = ''\nlet channel = null\n\n// init Metamodel\n$metamodel.init()\n\n// init runtime from a system\nsytemId = $db.importSystem($system.system)\n\nsystem = $component.get(sytemId)\nchannel = $component.get('channel')\n\nsystem.state('installed')\nchannel.$systemInstalled(sytemId)\nsystem.state('resolved')\nchannel.$systemResolved(sytemId)\nsystem.state('starting')\nchannel.$systemStarted(sytemId)\n\nsystem.start()\n\nsystem.state('active')\n\n/* Public property */\n\n/**\n * @property runtime\n * @type _Runtime\n * @description _Runtime instance\n */\nconst runtime = $component.get('runtime')\n\nexport default runtime\n","/*\n * System Runtime\n * \n * https://designfirst.io/systemruntime/\n * \n * Copyright 2022 Erwan Carriou\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* !! THIS FILE HAS BEEN GENERATED, DO NOT EDIT IT !! */\n\n/**\n * @module system\n * @description This module contains System Runtime core system.\n */\n\n/* Public properties */\n\n\n/**\n * System Runtime core system\n * @property {Object} system\n */\nexport default {system:\n{\n \"name\": \"system-runtime\",\n \"master\": false,\n \"version\": \"6.0.0-beta.5\",\n \"description\": \"System Runtime\",\n \"schemas\": {\n \"1ac07185641fa9f\": {\n \"_name\": \"_Behavior\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"core\": \"property\",\n \"component\": \"property\",\n \"action\": \"property\",\n \"state\": \"property\",\n \"useCoreAPI\": \"property\",\n \"context\": \"property\",\n \"_id\": \"1ac07185641fa9f\"\n },\n \"104ad1f48518376\": {\n \"_id\": \"104ad1f48518376\",\n \"_name\": \"_Channel\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"send\": \"event\",\n \"$systemInstalled\": \"event\",\n \"$systemResolved\": \"event\",\n \"$systemStarted\": \"event\",\n \"$systemStopped\": \"event\",\n \"$systemUninstalled\": \"event\"\n },\n \"111df11e2b19fde\": {\n \"_id\": \"111df11e2b19fde\",\n \"_name\": \"_Component\",\n \"_inherit\": [],\n \"_core\": true,\n \"on\": \"method\",\n \"off\": \"method\",\n \"require\": \"method\",\n \"destroy\": \"method\",\n \"init\": \"method\",\n \"error\": \"event\"\n },\n \"1723516a30132ac\": {\n \"_name\": \"_Database\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"collections\": \"method\",\n \"insert\": \"event\",\n \"update\": \"event\",\n \"remove\": \"event\",\n \"_id\": \"1723516a30132ac\"\n },\n \"1268f1dddd1fea7\": {\n \"_name\": \"_Logger\",\n \"_core\": true,\n \"level\": \"property\",\n \"debug\": \"method\",\n \"info\": \"method\",\n \"warn\": \"method\",\n \"error\": \"method\",\n \"_id\": \"1268f1dddd1fea7\"\n },\n \"14caa1c46414ee1\": {\n \"_name\": \"_Message\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"event\": \"property\",\n \"from\": \"property\",\n \"data\": \"property\",\n \"_id\": \"14caa1c46414ee1\"\n },\n \"193f1166eb16609\": {\n \"_name\": \"_Metamodel\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"schema\": \"method\",\n \"model\": \"method\",\n \"type\": \"method\",\n \"create\": \"method\",\n \"_id\": \"193f1166eb16609\"\n },\n \"157931f7a31b61d\": {\n \"_id\": \"157931f7a31b61d\",\n \"_name\": \"_OSGi\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"install\": \"method\",\n \"uninstall\": \"method\",\n \"start\": \"method\",\n \"stop\": \"method\",\n \"status\": \"method\",\n \"bundle\": \"method\"\n },\n \"12e211d4cd120a6\": {\n \"_id\": \"12e211d4cd120a6\",\n \"_name\": \"_Runtime\",\n \"_inherit\": [\"_OSGi\"],\n \"_core\": true,\n \"version\": \"property\",\n \"system\": \"method\",\n \"message\": \"method\",\n \"ready\": \"event\"\n },\n \"1cb761fa4510dca\": {\n \"_id\": \"1cb761fa4510dca\",\n \"_name\": \"_System\",\n \"_inherit\": [\"_SystemOSGi\"],\n \"_core\": true,\n \"name\": \"property\",\n \"master\": \"property\",\n \"version\": \"property\",\n \"description\": \"property\",\n \"schemas\": \"property\",\n \"models\": \"property\",\n \"behaviors\": \"property\",\n \"types\": \"property\",\n \"components\": \"property\"\n },\n \"145fe10c7514298\": {\n \"_id\": \"145fe10c7514298\",\n \"_name\": \"_SystemOSGi\",\n \"_inherit\": [\"_Component\"],\n \"_core\": true,\n \"state\": \"property\",\n \"location\": \"property\",\n \"start\": \"method\",\n \"stop\": \"method\"\n },\n \"e018483e-4254-455c-83e9-99bb8dc3b233\": {\n \"_id\": \"e018483e-4254-455c-83e9-99bb8dc3b233\",\n \"_name\": \"_History\",\n \"_core\": true,\n \"_inherit\": [\"_Component\"],\n \"back\": \"method\",\n \"forward\": \"method\",\n \"from\": \"method\",\n \"dump\": \"method\",\n \"get\": \"method\",\n \"load\": \"method\",\n \"start\": \"method\",\n \"stop\": \"method\",\n \"clear\": \"method\"\n }\n },\n \"models\": {\n \"166971fd9d107fd\": {\n \"_name\": \"_Behavior\",\n \"_core\": true,\n \"context\": {\n \"type\": \"any\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": null\n },\n \"core\": {\n \"type\": \"boolean\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"useCoreAPI\": {\n \"type\": \"any\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"component\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"action\": {\n \"type\": \"javascript\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"state\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"_id\": \"166971fd9d107fd\"\n },\n \"135c71078810af2\": {\n \"_id\": \"135c71078810af2\",\n \"_name\": \"_Channel\",\n \"_core\": true,\n \"send\": { \"params\": [{ \"name\": \"message\", \"type\": \"message\" }] },\n \"$systemInstalled\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemResolved\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemUninstalled\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemStarted\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"$systemStopped\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n }\n },\n \"123751cb591de26\": {\n \"_id\": \"123751cb591de26\",\n \"_name\": \"_Component\",\n \"_core\": true,\n \"on\": {\n \"params\": [\n { \"name\": \"state\", \"type\": \"string\" },\n { \"name\": \"action\", \"type\": \"function\" },\n {\n \"name\": \"useCoreAPI\",\n \"type\": \"any\",\n \"mandatory\": false,\n \"default\": false\n },\n {\n \"name\": \"isCore\",\n \"type\": \"boolean\",\n \"mandatory\": false,\n \"default\": false\n }\n ]\n },\n \"off\": {\n \"params\": [\n { \"name\": \"state\", \"type\": \"string\", \"mandatory\": false },\n { \"name\": \"behaviorId\", \"type\": \"string\", \"mandatory\": false }\n ]\n },\n \"require\": { \"params\": [{ \"name\": \"id\", \"type\": \"string\" }] },\n \"destroy\": { \"params\": [] },\n \"init\": { \"params\": [{ \"name\": \"document\", \"type\": \"object\" }] },\n \"error\": { \"params\": [{ \"name\": \"e\", \"type\": \"errorInfo\" }] }\n },\n \"18a51169d7112d4\": {\n \"_name\": \"_Database\",\n \"_core\": true,\n \"collections\": { \"result\": \"object\" },\n \"insert\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbInsertEvent\" }] },\n \"update\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbUpdateEvent\" }] },\n \"remove\": { \"params\": [{ \"name\": \"event\", \"type\": \"dbRemoveEvent\" }] },\n \"_id\": \"18a51169d7112d4\"\n },\n \"16b9d1ac2216ffe\": {\n \"_id\": \"16b9d1ac2216ffe\",\n \"_name\": \"_Logger\",\n \"_core\": true,\n \"level\": {\n \"type\": \"log\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"warn\"\n },\n \"debug\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"info\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"warn\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] },\n \"error\": { \"params\": [{ \"name\": \"message\", \"type\": \"any\" }] }\n },\n \"1d9b6139411aa91\": {\n \"_name\": \"_Message\",\n \"_core\": true,\n \"event\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"from\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"data\": {\n \"type\": \"array\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": []\n },\n \"_id\": \"1d9b6139411aa91\"\n },\n \"1628c13c22152e6\": {\n \"_name\": \"_Metamodel\",\n \"_core\": true,\n \"schema\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"schema\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"model\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"model\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"type\": {\n \"params\": [\n { \"name\": \"name\", \"type\": \"any\", \"default\": \"\", \"mandatory\": false },\n {\n \"name\": \"type\",\n \"type\": \"object\",\n \"default\": {},\n \"mandatory\": false\n }\n ],\n \"result\": \"any\"\n },\n \"create\": { \"params\": [] },\n \"_id\": \"1628c13c22152e6\"\n },\n \"100b91ed2211b15\": {\n \"_id\": \"100b91ed2211b15\",\n \"_name\": \"_OSGi\",\n \"install\": {\n \"params\": [\n { \"name\": \"url\", \"type\": \"any\", \"mandatory\": true, \"default\": \"\" },\n {\n \"name\": \"async\",\n \"type\": \"boolean\",\n \"mandatory\": false,\n \"default\": true\n }\n ],\n \"result\": \"string\"\n },\n \"uninstall\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"start\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"stop\": {\n \"params\": [\n { \"name\": \"id\", \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n ]\n },\n \"status\": { \"result\": \"object\" },\n \"_core\": true,\n \"bundle\": { \"result\": \"string\" }\n },\n \"14c7c105b31a160\": {\n \"_id\": \"14c7c105b31a160\",\n \"_name\": \"_Runtime\",\n \"_core\": true,\n \"version\": {\n \"type\": \"string\",\n \"readOnly\": true,\n \"mandatory\": true,\n \"default\": \"6.0.0-beta.5\"\n },\n \"system\": {\n \"params\": [{ \"name\": \"params\", \"type\": \"any\", \"mandatory\": false }],\n \"result\": \"object\"\n },\n \"message\": {\n \"params\": [{ \"name\": \"msg\", \"type\": \"message\", \"mandatory\": true }]\n },\n \"ready\": {}\n },\n \"170521b88614387\": {\n \"_name\": \"_System\",\n \"_core\": true,\n \"name\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": true,\n \"default\": \"\"\n },\n \"master\": {\n \"type\": \"boolean\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": false\n },\n \"version\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"0.0.1\"\n },\n \"description\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"\"\n },\n \"schemas\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"models\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"behaviors\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"types\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"components\": {\n \"type\": \"object\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": {}\n },\n \"_id\": \"170521b88614387\"\n },\n \"1b2811b092143f5\": {\n \"_id\": \"1b2811b092143f5\",\n \"_name\": \"_SystemOSGi\",\n \"start\": {},\n \"stop\": {},\n \"_core\": true,\n \"state\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"none\"\n },\n \"location\": {\n \"type\": \"string\",\n \"readOnly\": false,\n \"mandatory\": false,\n \"default\": \"\"\n }\n },\n \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\": {\n \"_id\": \"bd8d7e02-cd1f-4e4e-857f-077d6425cc1a\",\n \"_name\": \"_History\",\n \"_description\": \"\",\n \"back\": { \"result\": \"number\" },\n \"forward\": { \"result\": \"number\" },\n \"dump\": { \"result\": \"string\" },\n \"_core\": true,\n \"from\": {\n \"params\": [\n {\n \"name\": \"index\",\n \"type\": \"number\",\n \"mandatory\": true,\n \"default\": -1\n }\n ],\n \"result\": \"any\"\n },\n \"get\": {\n \"params\": [\n {\n \"name\": \"index\",\n \"type\": \"number\",\n \"mandatory\": true,\n \"default\": -1\n }\n ],\n \"result\": \"object\"\n },\n \"load\": {\n \"params\": [\n { \"name\": \"dump\", \"type\": \"any\", \"mandatory\": true, \"default\": \"\" }\n ],\n \"result\": \"boolean\"\n },\n \"start\": { \"result\": \"any\" },\n \"stop\": { \"result\": \"any\" },\n \"clear\": { \"result\": \"any\" }\n }\n },\n \"behaviors\": {\n \"12e491859c13918\": {\n \"_id\": \"12e491859c13918\",\n \"component\": \"_Channel\",\n \"state\": \"$systemStarted\",\n \"action\": \"function $systemStarted(id) { \\n let systems = null;\\n \\n if (id !== 'e89c617b6b15d24') {\\n if (typeof document !== 'undefined') {\\n systems = document.querySelectorAll('link[rel=system]');\\n \\n if ($state.get('runtime') && $state.get('runtime').state === 'ready') { \\n } else {\\n if (systems.length + 1 === $db.collections._System.count()) {\\n $component.get('runtime').ready();\\n }\\n }\\n }\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1e9021bd4e1bc6e\": {\n \"_id\": \"1e9021bd4e1bc6e\",\n \"component\": \"_Channel\",\n \"state\": \"$systemInstalled\",\n \"action\": \"function $systemInstalled(id) {\\n let systems = null,\\n dependencies = [],\\n master = [],\\n canStart = true;\\n\\n if (id !== 'e89c617b6b15d24') {\\n // if all systems are installed\\n systems = $db.collections._System.find({});\\n\\n systems.forEach(function (system) {\\n let sys = this.require(system._id);\\n if (sys && sys.state && sys.state() === 'none') {\\n canStart = false;\\n }\\n }.bind(this));\\n\\n // start all the systems\\n if (canStart) {\\n dependencies = $db.collections._System.find({\\n 'master': false\\n });\\n\\n dependencies.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n\\n master = $db.collections._System.find({\\n 'master': true\\n });\\n\\n master.forEach(function (dep) {\\n let system = this.require(dep._id);\\n channel = this.require('channel');\\n\\n if (system && system.state && system.state() === 'resolved') {\\n system.state('starting');\\n system.start();\\n channel.$systemStarted(dep._id);\\n system.state('active');\\n }\\n }.bind(this));\\n }\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1ba721201114b6b\": {\n \"_id\": \"1ba721201114b6b\",\n \"component\": \"_Component\",\n \"state\": \"destroy\",\n \"action\": \"function destroy() {\\n $component.destroy(this.id());\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"15486186f41a48c\": {\n \"_id\": \"15486186f41a48c\",\n \"component\": \"_Component\",\n \"state\": \"off\",\n \"action\": \"function off(state, behaviorId) {\\n let args = [],\\n i = 0,\\n numInjectedParams = 9,\\n length = arguments.length;\\n\\n if ($helper.isOnNode()) {\\n numInjectedParams = numInjectedParams +1;\\n }\\n\\n for (i = 0; i < length - numInjectedParams; i++) {\\n args.push(arguments[i]);\\n }\\n\\n if ($workflow.checkInput({\\n \\\"component\\\": this,\\n \\\"methodName\\\": \\\"off\\\",\\n \\\"args\\\": args\\n })) {\\n\\n if (state || behaviorId) {\\n if ($metamodel.isValidState(state, this.constructor.name)) {\\n $behavior.remove({\\n \\\"behaviorId\\\": behaviorId,\\n \\\"componentId\\\": this.id(),\\n \\\"state\\\": state\\n });\\n } else {\\n this.require('logger').warn(\\\"invoke \\\\'off\\\\' method of component '\\\" + this.id() + \\\"' with an invalid state '\\\" + state + \\\"'\\\");\\n }\\n } else {\\n $behavior.remove({\\n \\\"componentId\\\": this.id()\\n });\\n }\\n }\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1da0a17878104c3\": {\n \"_id\": \"1da0a17878104c3\",\n \"component\": \"_Component\",\n \"state\": \"require\",\n \"action\": \"function require(id) {\\n return $component.get(id);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1a5111d17a1800c\": {\n \"_id\": \"1a5111d17a1800c\",\n \"component\": \"_Database\",\n \"state\": \"collections\",\n \"action\": \"function collections() {\\n let result = {},\\n collectionName = '';\\n\\n for (collectionName in $db.store) {\\n if ($db.store.hasOwnProperty(collectionName)) {\\n result[collectionName] = $db.collections[collectionName];\\n }\\n }\\n return result;\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1d993108fa18ef2\": {\n \"_id\": \"1d993108fa18ef2\",\n \"component\": \"_Logger\",\n \"state\": \"debug\",\n \"action\": \"function debug(message) {\\n if (this.level() === 'debug') {\\n console.log('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"1a37a188e11fe73\": {\n \"_id\": \"1a37a188e11fe73\",\n \"component\": \"_Logger\",\n \"state\": \"error\",\n \"action\": \"function error(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug' || this.level() === 'error') {\\n console.error('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"1edd21e12a16534\": {\n \"_id\": \"1edd21e12a16534\",\n \"component\": \"_Logger\",\n \"state\": \"info\",\n \"action\": \"function info(message) {\\n if (this.level() === 'info' || this.level() === 'debug') {\\n console.info('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"141f2143d3122a4\": {\n \"_id\": \"141f2143d3122a4\",\n \"component\": \"_Logger\",\n \"state\": \"level\",\n \"action\": \"function level(val) {\\n $log.level(val);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"192401bab21304e\": {\n \"_id\": \"192401bab21304e\",\n \"component\": \"_Logger\",\n \"state\": \"warn\",\n \"action\": \"function warn(message) {\\n if (this.level() === 'info' || this.level() === 'warn' || this.level() === 'debug') {\\n console.warn('runtime: ' + message);\\n }\\n}\",\n \"core\": true\n },\n \"11fc715e2f1a31e\": {\n \"_id\": \"11fc715e2f1a31e\",\n \"component\": \"_Metamodel\",\n \"state\": \"create\",\n \"action\": \"function create() {\\n $metamodel.create();\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1232f1f107142cf\": {\n \"_id\": \"1232f1f107142cf\",\n \"component\": \"_Metamodel\",\n \"state\": \"model\",\n \"action\": \"function model(name, model) {\\n return $metamodel.model(name, model);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1365412f69153d2\": {\n \"_id\": \"1365412f69153d2\",\n \"component\": \"_Metamodel\",\n \"state\": \"schema\",\n \"action\": \"function schema(name, schema) {\\n return $metamodel.schema(name, schema);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"194db147fe161a2\": {\n \"_id\": \"194db147fe161a2\",\n \"component\": \"_Metamodel\",\n \"state\": \"type\",\n \"action\": \"function type(name, type) {\\n return $metamodel.type(name, type);\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1ef951f1411b895\": {\n \"_id\": \"1ef951f1411b895\",\n \"component\": \"_OSGi\",\n \"state\": \"install\",\n \"action\": \"function install(url, async) {\\n let importedSystem = null,\\n system = {},\\n systemId = '',\\n callbackLoad = null,\\n xhr = null,\\n result = '',\\n channel = $component.get('channel');\\n\\n if (typeof url === 'object') {\\n importedSystem = url;\\n } else {\\n if (url.indexOf('{') === 0) {\\n importedSystem = JSON.parse(url);\\n }\\n }\\n\\n if (importedSystem) {\\n systemId = $db.importSystem(importedSystem);\\n if (systemId) {\\n system = this.require(systemId);\\n\\n if (typeof url === 'string') {\\n system.location(url);\\n }\\n system.state('installed');\\n channel.$systemInstalled(systemId);\\n system.state('resolved');\\n channel.$systemResolved(systemId);\\n\\n result = systemId;\\n }\\n } else {\\n xhr = new XMLHttpRequest();\\n callbackLoad = function callbackLoad(system, url) {\\n let sysId = $db.importSystem(system),\\n sys = $component.get(sysId),\\n channel = $component.get('channel');\\n\\n if (typeof url === 'string') {\\n sys.location(url);\\n }\\n sys.state('installed');\\n channel.$systemInstalled(sysId);\\n sys.state('resolved');\\n channel.$systemResolved(sysId);\\n\\n result = sysId;\\n };\\n\\n if (async) {\\n xhr.open('GET', url, true);\\n xhr.onreadystatechange = function () {\\n if (xhr.readyState === 4) {\\n if (xhr.status === 200 || xhr.status === 0) {\\n if (xhr.response !== '') {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n };\\n xhr.send(null);\\n } else {\\n xhr.open('GET', url, false);\\n xhr.send(null);\\n if (xhr.status === 200 || xhr.status === 0) {\\n callbackLoad(JSON.parse(xhr.response), url);\\n }\\n }\\n }\\n return result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"14c1517b711cb78\": {\n \"_id\": \"14c1517b711cb78\",\n \"component\": \"_OSGi\",\n \"state\": \"uninstall\",\n \"action\": \"function uninstall(id) {\\n let search = {},\\n system = null,\\n behaviorId = '',\\n collection = '',\\n componentId = '',\\n length = 0,\\n i = 0,\\n coreComponents = ['admin', 'channel', 'db', 'logger', 'metamodel', 'runtime'];\\n\\n search = $db.collections._System.find({\\n '_id': id\\n });\\n\\n if (search.length) {\\n system = search[0];\\n // remove behaviors\\n if (system.behaviors) {\\n for (behaviorId in system.behaviors) {\\n $db.collections._Behavior.remove({\\n '_id': system.behaviors[behaviorId]._id\\n });\\n }\\n }\\n // remove components\\n if (system.components) {\\n for (collection in system.components) {\\n for (componentId in system.components[collection]) {\\n if (coreComponents.indexOf(componentId) === -1) {\\n $db.collections[collection].remove({\\n '_id': componentId\\n });\\n }\\n }\\n }\\n }\\n }\\n if (this.require(id) && this.require(id).state) {\\n this.require(id).state('uninstalled');\\n this.require('channel').$systemUninstalled(id);\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"105f219c6813643\": {\n \"_id\": \"105f219c6813643\",\n \"component\": \"_OSGi\",\n \"state\": \"start\",\n \"action\": \"function start(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'resolved' || system.state() === 'installed') {\\n system.state('starting');\\n if (system.start) {\\n system.start();\\n }\\n channel.$systemStarted(id);\\n system.state('active');\\n }\\n}\",\n \"useCoreAPI\": false,\n \"core\": true\n },\n \"1a81a1f00d17269\": {\n \"_id\": \"1a81a1f00d17269\",\n \"component\": \"_OSGi\",\n \"state\": \"stop\",\n \"action\": \"function stop(id) {\\n let system = this.require(id),\\n channel = this.require('channel');\\n\\n if (system && system.state() === 'active') {\\n system.state('stopping');\\n if (system.stop) {\\n system.stop();\\n }\\n channel.$systemStopped(id);\\n system.state('resolved');\\n channel.$systemResolved(id);\\n }\\n}\",\n \"useCoreAPI\": false,\n \"core\": true\n },\n \"116851b602128d1\": {\n \"_id\": \"116851b602128d1\",\n \"component\": \"_OSGi\",\n \"state\": \"status\",\n \"action\": \"function status() {\\n let result = {},\\n system = null,\\n length = 0,\\n i = 0;\\n\\n systems = $db.collections._System.find({});\\n\\n length = systems.length;\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n result[system.name] = {\\n 'id': system._id,\\n 'state': system.state,\\n 'name': system.name,\\n 'version': system.version,\\n 'location': system.location,\\n 'master': system.master\\n };\\n }\\n\\n return result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"19cf317d7217331\": {\n \"_id\": \"19cf317d7217331\",\n \"component\": \"_OSGi\",\n \"state\": \"bundle\",\n \"action\": \"function bundle() { \\n\\tlet result = $db.exportSystem();\\n\\treturn result;\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"13010167f313f87\": {\n \"_id\": \"13010167f313f87\",\n \"component\": \"_Runtime\",\n \"state\": \"system\",\n \"action\": \"function system(params) {\\n let RuntimeSystem = null,\\n system = {},\\n systemId = '',\\n result = [],\\n conf = {};\\n\\n if (params) {\\n if (typeof params === 'string') {\\n conf.master = true;\\n conf.name = params;\\n } else {\\n conf = params;\\n conf.master = true;\\n }\\n RuntimeSystem = this.require('_System');\\n system = new RuntimeSystem(conf);\\n system.state('active');\\n } else {\\n result = $db.collections._System.find({\\n 'master': true\\n });\\n if (result.length) {\\n systemId = result[0]._id;\\n system = $component.get(systemId);\\n }\\n }\\n return system;\\n}\",\n \"core\": true,\n \"useCoreAPI\": true\n },\n \"1cfa4145f614da8\": {\n \"_id\": \"1cfa4145f614da8\",\n \"component\": \"_Runtime\",\n \"state\": \"message\",\n \"action\": \"function message(msg) { \\n $db.collections._Message.insert(msg);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"1cb9d103d41dd97\": {\n \"_id\": \"1cb9d103d41dd97\",\n \"component\": \"e89c617b6b15d24\",\n \"state\": \"start\",\n \"action\": \"function start() {\\n if (typeof document !== 'undefined') {\\n document.addEventListener('DOMContentLoaded', function DOMContentLoaded(e) {\\n let systems = [],\\n system = null,\\n scripts = [],\\n script = null,\\n logLevel = 'warn',\\n i = 0,\\n length = 0;\\n \\n systems = document.querySelectorAll('link[rel=system]');\\n length = systems.length;\\n \\n // logger\\n scripts = document.querySelectorAll('script[log]');\\n if (scripts.length) {\\n logLevel = scripts[0].getAttribute('log');\\n this.require('logger').level(logLevel);\\n }\\n \\n // systems\\n for (i = 0; i < length; i++) {\\n system = systems[i];\\n \\n if (system.getAttribute('async') === 'false') {\\n this.require('runtime').install(system.href, false);\\n } else {\\n this.require('runtime').install(system.href, true);\\n }\\n }\\n \\n // ready event\\n if (length === 0) {\\n this.require('runtime').ready();\\n }\\n }.bind(this));\\n }\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"e2848b60-99a1-472f-b0e1-5923077f6c61\": {\n \"_id\": \"e2848b60-99a1-472f-b0e1-5923077f6c61\",\n \"component\": \"_History\",\n \"state\": \"back\",\n \"action\": \"function back() { \\n return $history.back();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"cebc40ad-c704-405c-b499-e60390b1bb82\": {\n \"_id\": \"cebc40ad-c704-405c-b499-e60390b1bb82\",\n \"component\": \"_History\",\n \"state\": \"forward\",\n \"action\": \"function forward() { \\n return $history.forward();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\": {\n \"_id\": \"c35af0df-2fc6-4af5-a476-4f2ee089c30e\",\n \"component\": \"_History\",\n \"state\": \"dump\",\n \"action\": \"function dump() { \\n return $history.dump();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"f06254ad-187e-400c-a582-b5ab81f24747\": {\n \"_id\": \"f06254ad-187e-400c-a582-b5ab81f24747\",\n \"component\": \"_History\",\n \"state\": \"get\",\n \"action\": \"function get(index) { \\n return $history.get(index);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\": {\n \"_id\": \"aa731445-8d7c-4dd7-a78f-5dd70f750f87\",\n \"component\": \"_History\",\n \"state\": \"from\",\n \"action\": \"function from(index) { \\n return $history.from(index);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"f565e46e-daee-492d-99ca-d9ed123132ba\": {\n \"_id\": \"f565e46e-daee-492d-99ca-d9ed123132ba\",\n \"component\": \"_History\",\n \"state\": \"load\",\n \"action\": \"function load(dump) { \\n return $history.load(dump);\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"d3827b91-f6db-46d9-833e-351564cb6e91\": {\n \"_id\": \"d3827b91-f6db-46d9-833e-351564cb6e91\",\n \"component\": \"_History\",\n \"state\": \"start\",\n \"action\": \"function start() { \\n return $history.start();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"aa3b13ab-8b69-4962-bc44-e975cd42a206\": {\n \"_id\": \"aa3b13ab-8b69-4962-bc44-e975cd42a206\",\n \"component\": \"_History\",\n \"state\": \"stop\",\n \"action\": \"function stop() { \\n return $history.stop();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n },\n \"b112782c-3633-443e-8d7a-8d379b44e32d\": {\n \"_id\": \"b112782c-3633-443e-8d7a-8d379b44e32d\",\n \"component\": \"_History\",\n \"state\": \"clear\",\n \"action\": \"function clear() { \\n return $history.clear();\\n}\",\n \"useCoreAPI\": true,\n \"core\": true\n }\n },\n \"types\": {\n \"css\": {\n \"_id\": \"h1d88311ac019211\",\n \"name\": \"css\",\n \"type\": \"string\",\n \"core\": true\n },\n \"date\": {\n \"_id\": \"c17cad1bc3d17752\",\n \"name\": \"date\",\n \"type\": \"object\",\n \"core\": true\n },\n \"json\": {\n \"_id\": \"e1d25a12e67127ed\",\n \"name\": \"json\",\n \"type\": \"object\",\n \"core\": true\n },\n \"dbInsertEvent\": {\n \"_id\": \"148ef1e19810e6d\",\n \"core\": true,\n \"name\": \"dbInsertEvent\",\n \"type\": \"object\",\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"document\": { \"type\": \"object\", \"mandatory\": true, \"default\": {} }\n }\n },\n \"dbRemoveEvent\": {\n \"_id\": \"1952e1ac4213f4a\",\n \"name\": \"dbRemoveEvent\",\n \"type\": \"object\",\n \"core\": true,\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"id\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" }\n }\n },\n \"dbUpdateEvent\": {\n \"_id\": \"1f5c41309711752\",\n \"core\": true,\n \"name\": \"dbUpdateEvent\",\n \"type\": \"object\",\n \"schema\": {\n \"collection\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"id\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"field\": { \"type\": \"string\", \"mandatory\": true, \"default\": \"\" },\n \"value\": { \"type\": \"any\", \"mandatory\": true, \"default\": null }\n }\n },\n \"collection\": {\n \"_id\": \"d1c0d0130c616199\",\n \"name\": \"collection\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": [\"string\"], \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"array\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false },\n \"kind\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"event\": {\n \"_id\": \"g1668d1de2d1ff6f\",\n \"name\": \"event\",\n \"type\": \"object\",\n \"schema\": {\n \"params\": { \"type\": [\"parameter\"], \"mandatory\": false },\n \"description\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"html\": {\n \"_id\": \"y161c21320b11acb\",\n \"name\": \"html\",\n \"type\": \"string\",\n \"core\": true\n },\n \"javascript\": {\n \"_id\": \"s13d4c1fdf916504\",\n \"name\": \"javascript\",\n \"type\": \"string\",\n \"core\": true\n },\n \"link\": {\n \"_id\": \"p124601801d1dbfa\",\n \"name\": \"link\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": \"string\", \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"{type}\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false },\n \"kind\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"log\": {\n \"_id\": \"d1fd161a4a4149fc\",\n \"name\": \"log\",\n \"type\": \"string\",\n \"value\": [\"debug\", \"info\", \"warn\", \"error\", \"off\"],\n \"core\": true\n },\n \"message\": {\n \"_id\": \"l13b061ac571272d\",\n \"name\": \"message\",\n \"type\": \"object\",\n \"schema\": {\n \"event\": { \"type\": \"string\", \"mandatory\": true },\n \"from\": { \"type\": \"string\", \"mandatory\": false },\n \"data\": { \"type\": \"array\", \"mandatory\": true }\n },\n \"core\": true\n },\n \"method\": {\n \"_id\": \"x1227218eed1f3e9\",\n \"name\": \"method\",\n \"type\": \"object\",\n \"schema\": {\n \"result\": { \"type\": \"any\", \"mandatory\": false },\n \"params\": { \"type\": [\"parameter\"], \"mandatory\": false },\n \"description\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"osgiStates\": {\n \"_id\": \"q1f0ca120fc13fb3\",\n \"name\": \"osgiStates\",\n \"type\": \"string\",\n \"value\": [\n \"none\",\n \"installed\",\n \"resolved\",\n \"starting\",\n \"active\",\n \"stopping\",\n \"uninstalled\"\n ],\n \"core\": true\n },\n \"parameter\": {\n \"_id\": \"e1b18e16c6c195ad\",\n \"name\": \"parameter\",\n \"type\": \"object\",\n \"schema\": {\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"name\": { \"type\": \"string\", \"mandatory\": true },\n \"type\": { \"type\": \"any\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": false },\n \"default\": { \"type\": \"{type}\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"property\": {\n \"_id\": \"a16a3a1ae051a55d\",\n \"name\": \"property\",\n \"type\": \"object\",\n \"schema\": {\n \"type\": { \"type\": \"string\", \"mandatory\": true },\n \"readOnly\": { \"type\": \"boolean\", \"mandatory\": true },\n \"mandatory\": { \"type\": \"boolean\", \"mandatory\": true },\n \"default\": { \"type\": \"{type}\", \"mandatory\": true },\n \"description\": { \"type\": \"string\", \"mandatory\": false },\n \"label\": { \"type\": \"string\", \"mandatory\": false }\n },\n \"core\": true\n },\n \"text\": {\n \"_id\": \"c136fc129a912f54\",\n \"name\": \"text\",\n \"type\": \"string\",\n \"core\": true\n },\n \"errorInfo\": {\n \"_id\": \"e198761fc0b1ae8a\",\n \"name\": \"errorInfo\",\n \"type\": \"object\",\n \"schema\": {\n \"message\": { \"type\": \"string\", \"mandatory\": true },\n \"stack\": { \"type\": \"object\", \"mandatory\": true }\n },\n \"core\": true\n }\n },\n \"components\": {\n \"_Channel\": { \"channel\": { \"_id\": \"channel\" } },\n \"_Database\": { \"db\": { \"_id\": \"db\" } },\n \"_Logger\": { \"logger\": { \"_id\": \"logger\", \"level\": \"warn\" } },\n \"_Metamodel\": { \"metamodel\": { \"_id\": \"metamodel\" } },\n \"_Runtime\": { \"runtime\": { \"_id\": \"runtime\", \"version\": \"6.0.0-beta.5\" } },\n \"_History\": { \"history\": { \"_id\": \"history\" } }\n },\n \"_id\": \"e89c617b6b15d24\"\n}\n\n};\n"],"names":["$mson","ID","NAME","DESCRIPTION","INHERIT","CLASS","CORE","INTERNAL_NAMES","PROPERTY_TYPE","COLLECTION_TYPE","LINK_TYPE","METHOD_TYPE","EVENT_TYPE","INTERNAL_TYPES","DEFAULT_TYPES","SCHEMA_DEFINITION","_id","type","mandatory","_name","_inherit","default","_class","_core","_description","MODEL_DEFINITION","TYPE_DEFINITION","name","schema","value","core","description","loggerRef","fakeLoggerRef","currentLevel","level","levelName","this","debug","message","console","log","info","warn","error","getLogger","loggerId","loggers","result","$metamodel","getModel","$db","collections","_Logger","find","length","$component","get","$log","unknownProperty","propertyName","invalidPropertyType","property","realType","constructor","invalidEnumValue","invalidClassName","componentId","constructorName","missingProperty","missingImplementation","invalidTypeImp","className","missingPropertyImp","unknownPropertyImp","invalidTypeDefinition","invalidPropertyName","id","propertyValue","classInfo","readOnlyProperty","invalidDocumentOnDbInsert","doc","collectionName","JSON","stringify","replace","invalidPropertyTypeOnDbUpdate","unknownPropertyOnDbUpdate","unknownMethod","classId","methodName","invalidCollectionName","invalidResultType","expectedType","unknownComponent","invalidParamNumber","invalidParamType","paramName","undefined","behaviorNotUnique","stateName","invalidStateOn","invalidStateOff","masterSystemNotFound","invalidType","typeName","invalidConfiguration","obj","unknownType","unknownPath","path","subpath","canNotYetValidate","invalidChannelEvent","eventName","invalidParamNumberMethodOn","updateUuid","currentId","newId","alreadyUsed","invalidUseOfComponent","invalidSchema","invalidModel","invalidParameters","document","destroyedComponentCall","invalidConctructorParameters","object","unknownModel","missingSchema","cyclicDependency","invalidEnumType","loadSchema","loadModel","loadType","generatingSchema","checkModel","createClass","initDb","actionInvokeError","state","invalidSchemaPropertyName","propName","invalidSchemaProperty","invalidPropertyFormat","invalidState","model","unknownContext","historyDocumentInserted","historyDocumentRemoved","historyDocumentUpdated","fieldName","invalidCollectionItem","runtimeRef","$helper","isRuntime","_Runtime","getRuntime","runtimeId","search","isOnNode","window","global","generateId","validPrefix","charAt","Math","floor","random","getPrefix","c","r","toString","store","inheritance","inheritanceTree","schemas","generatedSchemas","models","generatedModels","states","isInternalName","indexOf","generateModels","att","schemaName","schemaDef","modelName","modelParent","modelExt","modelDef","mergedModel","parents","i","j","nbAncestors","sortInheritTree","Array","isArray","readOnly","label","params","merge","temp","keys","push","Object","sort","forEach","index","sortInheritanceTree","getParents","reverse","_GeneratedSchema","insert","_GeneratedModel","createInheritanceTree","c3linerization","ancestors","_removeCandidate","elt","elts","arr","pop","_isCandidate","_findCandidate","_linerize","_checkCyclicDep","item","isCyclicDeb","slice","concat","candidates","_isEmpty","_merge","map","extend","sonExtend","son","ancestor","prop","checkImp","classDef","classImp","checkSchema","hasType","checkCustomSchema","typeDef","isValidType","isValidSchema","getRealClassName","trim","isCustomType","isClassName","getRealType","getClassName","isValidEnumValue","enumValue","date","Date","isNaN","getDate","checkType","componentSchema","attributeType","split","source","target","hasOwnProperty","initConfiguration","isMethod","defaultValue","_Type","_Schema","generateConfiguration","paramPropName","methodConf","parse","clear","isDocument","_isValidCustomType","inheritFrom","isValid","_isValidType","isValidEnum","component","componentClassName","_isInstanceOf","field","typeSchema","typeRef","_isValidClassName","_isValidTypeReference","isValidObject","strict","cleanRef","comp","isComponent","typeArray","getType","getModelPathType","subpaths","structure","isValidModelPath","parentName","_searchParent","ancestorName","isAncestor","mergedSchema","inherits","filteredList","list","cleanName","_removeDuplicate","update","_Model","init","collection","create","types","inherit","loadInMemory","generateSchemas","checkModels","attribute","getStates","createDbStructure","isEvent","isProperty","isLink","isCollection","isStructure","isValidState","prepareObject","getSchema","createFunction","func","useCoreAPI","beginBody","funcParams","paramsClean","funcBody","header","action","isArrowFunction","isAsync","isOneLine","functionName","substring","param","lastIndexOf","Function","join","$behavior","add","context","behaviorId","strAction","_Behavior","remove","removeFromMemory","getActions","dbResult","behavior","$state","set","stack","cursorIndex","historizationEnabled","$history","isEnabled","start","stop","pushState","back","oldValue","forward","from","dump","load","noError","newStack","e","RuntimeError","isModelPath","getParamNumber","method","min","max","parent","injectedParams","args","setDefaultValue","checkInputNumbers","checkInput","checkOutput","process","setTimeout","bind","apply","system","paramNumber","modelNumberParam","paramsName","paramsType","paramsNumber","getParamNames","getParamTypes","methodResult","returnType","resultType","getReturnType","data","currentState","actions","behaviors","actionFromMemory","prototype","Error","$workflow","_Array","conf","arrDb","isReadOnly","_copy","val","require","_add","deleteCount","del","unshift","splice","_remove","shift","funct","begin","end","getStructureValue","subPath","setStructureValue","addProperties","Class","properties","propNames","getProperties","proxy","propertyType","propertyReadOnly","position","runtimeArr","realVal","coll","_isValidCollection","_getRealCollection","addStructure","toISOString","sructure","getStructureProperties","parentPath","fullPath","addMethods","methods","getMethods","paramsWithContext","arguments","proxyWithContext","call","addEvents","events","getEvents","systems","systemId","_System","master","event","_Message","factory","config","freeze","addIdClass","on","isCore","addOn","addOnClass","off","addOffClass","addRequireClass","addInitClass","destroy","addDestroyClass","collectionNames","internalDB","coreDb","arrCopy","docA","docB","isValidWithSelectors","query","selector","RegExp","match","findInArray","expSystem","dbDump","mastersystem","exportedSystem","version","typeId","schemaId","modelId","count","components","DatabaseCollection","importSystem","importedSystem","impSystem","resultId","criteria","Component","channels","_Channel","options","docs","attributeName","createdDocumentId","upsert","exportSystem","defaultName","expSubsystem","runtimeSystemId","runtimeSystem","sytemId","channel","send","$systemInstalled","$systemResolved","$systemStarted","$systemStopped","$systemUninstalled","install","uninstall","status","bundle","ready","location","css","json","dbInsertEvent","dbRemoveEvent","dbUpdateEvent","kind","html","javascript","link","osgiStates","parameter","text","errorInfo","_Database","db","logger","_Metamodel","metamodel","runtime","_History","history"],"mappings":"AAkJA,IAAeA,EAAA,CACbC,GA1HS,MA2HTC,KA1HW,QA2HXC,YA1HkB,eA2HlBC,QA1Hc,WA2HdC,MA1HY,SA2HZC,KA1HW,QA2HXC,eAzHqB,CACrB,MACA,QACA,WACA,eACA,SACA,SAoHAC,cAjHoB,WAkHpBC,gBAjHsB,aAkHtBC,UAjHgB,OAkHhBC,YAjHkB,SAkHlBC,WAjHiB,QAkHjBC,eAhHqB,CAAC,WAAY,aAAc,OAAQ,SAAU,SAiHlEC,cA/GoB,CACpB,UACA,SACA,SACA,SACA,WACA,QACA,OACA,OAwGAC,kBArGwB,CACxBC,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,CACLF,KAAM,SACNC,WAAW,GAEbE,SAAU,CACRH,KAAM,CAAC,UACPC,WAAW,EACXG,QAAS,CAAC,eAEZC,OAAQ,CACNL,KAAM,UACNC,WAAW,GAEbK,MAAO,CACLN,KAAM,UACNC,WAAW,GAEbM,aAAc,CACZP,KAAM,SACNC,WAAW,IA8EbO,iBA1EuB,CACvBT,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbC,MAAO,CACLF,KAAM,SACNC,WAAW,GAEbE,SAAU,CACRH,KAAM,CAAC,UACPC,WAAW,GAEbI,OAAQ,CACNL,KAAM,UACNC,WAAW,GAEbK,MAAO,CACLN,KAAM,UACNC,WAAW,GAEbM,aAAc,CACZP,KAAM,SACNC,WAAW,IAoDbQ,gBAhDsB,CACtBV,IAAK,CACHC,KAAM,SACNC,WAAW,GAEbS,KAAM,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,MAAM,YACbwY,GAAQG,gBAAgBJ,IACxBnI,GAAOpQ,MAAM,YACbwY,GAAQI,eAAeL,IAEvBnI,GAAO7B,QAEP6B,GAAOpQ,MAAM,UASR,MAACua,GAAU5f,GAAWC,IAAI"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 49db54c..7ef8554 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "system-runtime", - "version": "6.0.0-beta.4", + "version": "6.0.0-beta.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "system-runtime", - "version": "6.0.0-beta.4", + "version": "6.0.0-beta.5", "license": "Apache-2.0", "devDependencies": { "@rollup/plugin-terser": "0.1.0", diff --git a/package.json b/package.json index 7138adf..e785fe5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "system-runtime", - "version": "6.0.0-beta.4", + "version": "6.0.0-beta.5", "description": "A JavaScript library that runs systems", "homepage": "https://designfirst.io/systemruntime/", "keywords": [ diff --git a/src/banners/systemmodule-header.txt b/src/banners/systemmodule-header.txt index 1f051b5..5d05524 100644 --- a/src/banners/systemmodule-header.txt +++ b/src/banners/systemmodule-header.txt @@ -18,7 +18,7 @@ * limitations under the License. */ -/* !! This file has been generated, do not edit it !! */ +/* !! THIS FILE HAS BEEN GENERATED, DO NOT EDIT IT !! */ /** * @module system diff --git a/src/system.js b/src/system.js index 192d31b..8da26cd 100644 --- a/src/system.js +++ b/src/system.js @@ -18,7 +18,7 @@ * limitations under the License. */ -/* !! This file has been generated, do not edit it !! */ +/* !! THIS FILE HAS BEEN GENERATED, DO NOT EDIT IT !! */ /** * @module system @@ -35,7 +35,7 @@ export default { system: { name: 'system-runtime', master: false, - version: '6.0.0-beta.4', + version: '6.0.0-beta.5', description: 'System Runtime', schemas: { '1ac07185641fa9f': { @@ -413,7 +413,7 @@ export default { type: 'string', readOnly: true, mandatory: true, - default: '6.0.0-beta.4', + default: '6.0.0-beta.5', }, system: { params: [{ name: 'params', type: 'any', mandatory: false }], @@ -1019,7 +1019,7 @@ export default { _Database: { db: { _id: 'db' } }, _Logger: { logger: { _id: 'logger', level: 'warn' } }, _Metamodel: { metamodel: { _id: 'metamodel' } }, - _Runtime: { runtime: { _id: 'runtime', version: '6.0.0-beta.4' } }, + _Runtime: { runtime: { _id: 'runtime', version: '6.0.0-beta.5' } }, _History: { history: { _id: 'history' } }, }, _id: 'e89c617b6b15d24', diff --git a/src/system/system-runtime.json b/src/system/system-runtime.json index 25a4a0c..d80903d 100644 --- a/src/system/system-runtime.json +++ b/src/system/system-runtime.json @@ -1,7 +1,7 @@ { "name": "system-runtime", "master": false, - "version": "6.0.0-beta.4", + "version": "6.0.0-beta.5", "description": "System Runtime", "schemas": { "1ac07185641fa9f": { @@ -379,7 +379,7 @@ "type": "string", "readOnly": true, "mandatory": true, - "default": "6.0.0-beta.4" + "default": "6.0.0-beta.5" }, "system": { "params": [{ "name": "params", "type": "any", "mandatory": false }], @@ -967,7 +967,7 @@ "_Database": { "db": { "_id": "db" } }, "_Logger": { "logger": { "_id": "logger", "level": "warn" } }, "_Metamodel": { "metamodel": { "_id": "metamodel" } }, - "_Runtime": { "runtime": { "_id": "runtime", "version": "6.0.0-beta.4" } }, + "_Runtime": { "runtime": { "_id": "runtime", "version": "6.0.0-beta.5" } }, "_History": { "history": { "_id": "history" } } }, "_id": "e89c617b6b15d24"