diff --git a/package-lock.json b/package-lock.json index 0543f36..c9c7bff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,26 +8,26 @@ "name": "genpres", "version": "1.0.0", "dependencies": { - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.5", "@fontsource/roboto": "^4.5.8", - "@mui/icons-material": "^5.11.11", - "@mui/material": "^5.11.11", - "@mui/x-data-grid": "^6.0.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-markdown": "^8.0.5", - "use-sync-external-store": "^1.2.0" + "@mui/icons-material": "^5.15.15", + "@mui/material": "^5.15.15", + "@mui/x-data-grid": "^6.19.11", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-markdown": "^8.0.7", + "use-sync-external-store": "^1.2.2" }, "devDependencies": { - "@types/node": "^20.9.1", - "@vitejs/plugin-react": "^4.2.0", - "autoprefixer": "^10.4.16", - "mocha": "^8.3.2", - "postcss": "^8.4.31", + "@types/node": "^20.12.7", + "@vitejs/plugin-react": "^4.2.1", + "autoprefixer": "^10.4.19", + "mocha": "^8.4.0", + "postcss": "^8.4.38", "remotedev": "^0.2.9", - "sass": "^1.69.5", - "vite": "^5.0.0" + "sass": "^1.76.0", + "vite": "^5.2.10" }, "engines": { "node": "~18 || ~20", @@ -35,55 +35,55 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", - "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", + "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.5", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.5", - "@babel/parser": "^7.23.5", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.24.5", + "@babel/helpers": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -105,14 +105,14 @@ "dev": true }, "node_modules/@babel/generator": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", - "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "dependencies": { - "@babel/types": "^7.23.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.5", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -120,14 +120,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -170,27 +170,27 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -200,50 +200,50 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "engines": { "node": ">=6.9.0" } @@ -258,36 +258,37 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", - "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", + "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.5", - "@babel/types": "^7.23.5" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", - "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -297,12 +298,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz", - "integrity": "sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.5.tgz", + "integrity": "sha512-RtCJoUO2oYrYwFPtR1/jkoBEcFuI1ae9a9IMxeyAVa3a1Ap4AnxmyIKG2b2FaJKqkidw/0cxRbWN+HOs6ZWd1w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -312,12 +313,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz", - "integrity": "sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.1.tgz", + "integrity": "sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -327,9 +328,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", - "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -338,34 +339,34 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", - "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.5", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.5", - "@babel/types": "^7.23.5", - "debug": "^4.1.0", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -373,12 +374,12 @@ } }, "node_modules/@babel/types": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", - "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -421,9 +422,9 @@ "integrity": "sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==" }, "node_modules/@emotion/is-prop-valid": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.1.tgz", - "integrity": "sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", "dependencies": { "@emotion/memoize": "^0.8.1" } @@ -434,14 +435,14 @@ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, "node_modules/@emotion/react": { - "version": "11.11.1", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.1.tgz", - "integrity": "sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==", + "version": "11.11.4", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", + "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", "@emotion/cache": "^11.11.0", - "@emotion/serialize": "^1.1.2", + "@emotion/serialize": "^1.1.3", "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", "@emotion/utils": "^1.2.1", "@emotion/weak-memoize": "^0.3.1", @@ -457,9 +458,9 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.2.tgz", - "integrity": "sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.4.tgz", + "integrity": "sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==", "dependencies": { "@emotion/hash": "^0.9.1", "@emotion/memoize": "^0.8.1", @@ -474,14 +475,14 @@ "integrity": "sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==" }, "node_modules/@emotion/styled": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.0.tgz", - "integrity": "sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==", + "version": "11.11.5", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.11.5.tgz", + "integrity": "sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==", "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", - "@emotion/is-prop-valid": "^1.2.1", - "@emotion/serialize": "^1.1.2", + "@emotion/is-prop-valid": "^1.2.2", + "@emotion/serialize": "^1.1.4", "@emotion/use-insertion-effect-with-fallbacks": "^1.0.1", "@emotion/utils": "^1.2.1" }, @@ -518,10 +519,26 @@ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz", - "integrity": "sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -535,9 +552,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz", - "integrity": "sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -551,9 +568,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz", - "integrity": "sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -567,9 +584,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz", - "integrity": "sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -583,9 +600,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz", - "integrity": "sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -599,9 +616,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz", - "integrity": "sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -615,9 +632,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz", - "integrity": "sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -631,9 +648,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz", - "integrity": "sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -647,9 +664,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz", - "integrity": "sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -663,9 +680,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz", - "integrity": "sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -679,9 +696,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz", - "integrity": "sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -695,9 +712,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz", - "integrity": "sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -711,9 +728,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz", - "integrity": "sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -727,9 +744,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz", - "integrity": "sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -743,9 +760,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz", - "integrity": "sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -759,9 +776,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.8.tgz", - "integrity": "sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -775,9 +792,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz", - "integrity": "sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -791,9 +808,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz", - "integrity": "sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -807,9 +824,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz", - "integrity": "sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -823,9 +840,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz", - "integrity": "sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -839,9 +856,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz", - "integrity": "sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -855,9 +872,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz", - "integrity": "sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -871,28 +888,28 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.2.tgz", - "integrity": "sha512-Ii3MrfY/GAIN3OhXNzpCKaLxHQfJF9qvwq/kEJYdqDxeIHa01K8sldugal6TmeeXl+WMvhv9cnVzUTaFFJF09A==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.1.tgz", + "integrity": "sha512-42UH54oPZHPdRHdw6BgoBD6cg/eVTmVrFcgeRDM3jbO7uxSoipVcmcIGFcA5jmOHO5apcyvBhkSKES3fQJnu7A==", "dependencies": { - "@floating-ui/utils": "^0.1.3" + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/dom": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", - "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.4.tgz", + "integrity": "sha512-0G8R+zOvQsAG1pg2Q99P21jiqxqGBW1iRe/iXHsBRBxnpXKFI8QwbB4x5KmYLggNO5m34IQgOIu9SCRfR/WWiQ==", "dependencies": { - "@floating-ui/core": "^1.4.2", - "@floating-ui/utils": "^0.1.3" + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.4.tgz", - "integrity": "sha512-CF8k2rgKeh/49UrnIBs4BdxPUV6vize/Db1d/YbCLyp9GiVZ0BEwf5AiDSxJRCr6yOkGqTFHtmrULxkEfYZ7dQ==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.9.tgz", + "integrity": "sha512-q0umO0+LQK4+p6aGyvzASqKbKOJcAHJ7ycE9CuUvfx3s9zTHWmGJTPOIlM/hmSBfUfg/XfY5YhLBLR/LHwShQQ==", "dependencies": { - "@floating-ui/dom": "^1.5.1" + "@floating-ui/dom": "^1.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -900,9 +917,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", - "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", + "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" }, "node_modules/@fontsource/roboto": { "version": "4.5.8", @@ -910,32 +927,32 @@ "integrity": "sha512-CnD7zLItIzt86q4Sj3kZUiLcBk1dSk81qcqgMGaZe7SQ1P8hFNxhMl5AZthK1zrDM5m74VVhaOpuMGIL4gagaA==" }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "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==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -948,9 +965,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -958,16 +975,16 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-beta.27", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.27.tgz", - "integrity": "sha512-duL37qxihT1N0pW/gyXVezP7SttLkF+cLAs/y6g6ubEFmVadjbnZ45SeF12/vAiKzqwf5M0uFH1cczIPXFZygA==", - "dependencies": { - "@babel/runtime": "^7.23.5", - "@floating-ui/react-dom": "^2.0.4", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.0", + "version": "5.0.0-beta.40", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.40.tgz", + "integrity": "sha512-I/lGHztkCzvwlXpjD2+SNmvNQvB4227xBXhISPjEaJUXGImOQ9f3D2Yj/T3KasSI/h0MLWy74X0J6clhPmsRbQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@floating-ui/react-dom": "^2.0.8", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", "@popperjs/core": "^2.11.8", - "clsx": "^2.0.0", + "clsx": "^2.1.0", "prop-types": "^15.8.1" }, "engines": { @@ -989,20 +1006,20 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.0.tgz", - "integrity": "sha512-NpGtlHwuyLfJtdrlERXb8qRqd279O0VnuGaZAor1ehdNhUJOD1bSxHDeXKZkbqNpvi50hasFj7lsbTpluworTQ==", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.15.tgz", + "integrity": "sha512-aXnw29OWQ6I5A47iuWEI6qSSUfH6G/aCsW9KmW3LiFqr7uXZBK4Ks+z8G+qeIub8k0T5CMqlT2q0L+ZJTMrqpg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" } }, "node_modules/@mui/icons-material": { - "version": "5.14.19", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.14.19.tgz", - "integrity": "sha512-yjP8nluXxZGe3Y7pS+yxBV+hWZSsSBampCxkZwaw+1l+feL+rfP74vbEFbMrX/Kil9I/Y1tWfy5bs/eNvwNpWw==", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-5.15.15.tgz", + "integrity": "sha512-kkeU/pe+hABcYDH6Uqy8RmIsr2S/y5bP2rp+Gat4CcRjCcVne6KudS1NrZQhUCRysrTDCAhcbcf9gt+/+pGO2g==", "dependencies": { - "@babel/runtime": "^7.23.4" + "@babel/runtime": "^7.23.9" }, "engines": { "node": ">=12.0.0" @@ -1023,19 +1040,19 @@ } }, "node_modules/@mui/material": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.0.tgz", - "integrity": "sha512-60CDI/hQNwJv9a3vEZtFG7zz0USdQhVwpBd3fZqrzhuXSdiMdYMaZcCXeX/KMuNq0ZxQEAZd74Pv+gOb408QVA==", - "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/base": "5.0.0-beta.27", - "@mui/core-downloads-tracker": "^5.15.0", - "@mui/system": "^5.15.0", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.0", - "@types/react-transition-group": "^4.4.9", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.15.tgz", + "integrity": "sha512-3zvWayJ+E1kzoIsvwyEvkTUKVKt1AjchFFns+JtluHCuvxgKcLSRJTADw37k0doaRtVAsyh8bz9Afqzv+KYrIA==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/base": "5.0.0-beta.40", + "@mui/core-downloads-tracker": "^5.15.15", + "@mui/system": "^5.15.15", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", "prop-types": "^15.8.1", "react-is": "^18.2.0", "react-transition-group": "^4.4.5" @@ -1067,12 +1084,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.0.tgz", - "integrity": "sha512-7WxtIhXxNek0JjtsYy+ut2LtFSLpsUW5JSDehQO+jF7itJ8ehy7Bd9bSt2yIllbwGjCFowLfYpPk2Ykgvqm1tA==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", + "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/utils": "^5.15.0", + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.15.14", "prop-types": "^15.8.1" }, "engines": { @@ -1093,13 +1110,13 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.0.tgz", - "integrity": "sha512-6NysIsHkuUS2lF+Lzv1jiK3UjBJk854/vKVcJQVGKlPiqNEVZJNlwaSpsaU5xYXxWEZYfbVFSAomLOS/LV/ovQ==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", + "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", "dependencies": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.9", "@emotion/cache": "^11.11.0", - "csstype": "^3.1.2", + "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { @@ -1124,17 +1141,17 @@ } }, "node_modules/@mui/system": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.0.tgz", - "integrity": "sha512-8TPjfTlYBNB7/zBJRL4QOD9kImwdZObbiYNh0+hxvhXr2koezGx8USwPXj8y/JynbzGCkIybkUztCdWlMZe6OQ==", - "dependencies": { - "@babel/runtime": "^7.23.5", - "@mui/private-theming": "^5.15.0", - "@mui/styled-engine": "^5.15.0", - "@mui/types": "^7.2.11", - "@mui/utils": "^5.15.0", - "clsx": "^2.0.0", - "csstype": "^3.1.2", + "version": "5.15.15", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.15.tgz", + "integrity": "sha512-aulox6N1dnu5PABsfxVGOZffDVmlxPOVgj56HrUnJE8MCSh8lOvvkd47cebIVQQYAjpwieXQXiDPj5pwM40jTQ==", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.15.14", + "@mui/styled-engine": "^5.15.14", + "@mui/types": "^7.2.14", + "@mui/utils": "^5.15.14", + "clsx": "^2.1.0", + "csstype": "^3.1.3", "prop-types": "^15.8.1" }, "engines": { @@ -1163,9 +1180,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.11", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.11.tgz", - "integrity": "sha512-KWe/QTEsFFlFSH+qRYf3zoFEj3z67s+qAuSnMMg+gFwbxG7P96Hm6g300inQL1Wy///gSRb8juX7Wafvp93m3w==", + "version": "7.2.14", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", + "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -1176,11 +1193,11 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.0.tgz", - "integrity": "sha512-XSmTKStpKYamewxyJ256+srwEnsT3/6eNo6G7+WC1tj2Iq9GfUJ/6yUoB7YXjOD2jTZ3XobToZm4pVz1LBt6GA==", + "version": "5.15.14", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", + "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", "dependencies": { - "@babel/runtime": "^7.23.5", + "@babel/runtime": "^7.23.9", "@types/prop-types": "^15.7.11", "prop-types": "^15.8.1", "react-is": "^18.2.0" @@ -1203,9 +1220,9 @@ } }, "node_modules/@mui/x-data-grid": { - "version": "6.18.3", - "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-6.18.3.tgz", - "integrity": "sha512-0XTLW6e7cB3QBQKoAgdZN2M4WKxbmy0pJHRA9RrSUn91nInqZgwtxpI5fi7aTpX9vffRaUfKi7epr/zNyvxPOQ==", + "version": "6.19.11", + "resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-6.19.11.tgz", + "integrity": "sha512-QsUp2cPkjUm8vyTR5gYWuCFqxspljOzElbCm412wzvMTJSKaB0kz7CEecFhxjlsMjQ8B7kY8oDF3LXjjucFcPQ==", "dependencies": { "@babel/runtime": "^7.23.2", "@mui/utils": "^5.14.16", @@ -1237,9 +1254,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.6.1.tgz", - "integrity": "sha512-0WQ0ouLejaUCRsL93GD4uft3rOmB8qoQMU05Kb8CmMtMBe7XUDLAltxVZI1q6byNqEtU7N1ZX1Vw5lIpgulLQA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", + "integrity": "sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==", "cpu": [ "arm" ], @@ -1250,9 +1267,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.6.1.tgz", - "integrity": "sha512-1TKm25Rn20vr5aTGGZqo6E4mzPicCUD79k17EgTLAsXc1zysyi4xXKACfUbwyANEPAEIxkzwue6JZ+stYzWUTA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz", + "integrity": "sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==", "cpu": [ "arm64" ], @@ -1263,9 +1280,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.6.1.tgz", - "integrity": "sha512-cEXJQY/ZqMACb+nxzDeX9IPLAg7S94xouJJCNVE5BJM8JUEP4HeTF+ti3cmxWeSJo+5D+o8Tc0UAWUkfENdeyw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz", + "integrity": "sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==", "cpu": [ "arm64" ], @@ -1276,9 +1293,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.6.1.tgz", - "integrity": "sha512-LoSU9Xu56isrkV2jLldcKspJ7sSXmZWkAxg7sW/RfF7GS4F5/v4EiqKSMCFbZtDu2Nc1gxxFdQdKwkKS4rwxNg==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz", + "integrity": "sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==", "cpu": [ "x64" ], @@ -1289,9 +1306,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.6.1.tgz", - "integrity": "sha512-EfI3hzYAy5vFNDqpXsNxXcgRDcFHUWSx5nnRSCKwXuQlI5J9dD84g2Usw81n3FLBNsGCegKGwwTVsSKK9cooSQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz", + "integrity": "sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz", + "integrity": "sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==", "cpu": [ "arm" ], @@ -1302,9 +1332,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.6.1.tgz", - "integrity": "sha512-9lhc4UZstsegbNLhH0Zu6TqvDfmhGzuCWtcTFXY10VjLLUe4Mr0Ye2L3rrtHaDd/J5+tFMEuo5LTCSCMXWfUKw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz", + "integrity": "sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==", "cpu": [ "arm64" ], @@ -1315,9 +1345,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.6.1.tgz", - "integrity": "sha512-FfoOK1yP5ksX3wwZ4Zk1NgyGHZyuRhf99j64I5oEmirV8EFT7+OhUZEnP+x17lcP/QHJNWGsoJwrz4PJ9fBEXw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz", + "integrity": "sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==", "cpu": [ "arm64" ], @@ -1327,10 +1357,49 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz", + "integrity": "sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz", + "integrity": "sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz", + "integrity": "sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.6.1.tgz", - "integrity": "sha512-DNGZvZDO5YF7jN5fX8ZqmGLjZEXIJRdJEdTFMhiyXqyXubBa0WVLDWSNlQ5JR2PNgDbEV1VQowhVRUh+74D+RA==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", + "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", "cpu": [ "x64" ], @@ -1341,9 +1410,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.6.1.tgz", - "integrity": "sha512-RkJVNVRM+piYy87HrKmhbexCHg3A6Z6MU0W9GHnJwBQNBeyhCJG9KDce4SAMdicQnpURggSvtbGo9xAWOfSvIQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz", + "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==", "cpu": [ "x64" ], @@ -1354,9 +1423,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.6.1.tgz", - "integrity": "sha512-v2FVT6xfnnmTe3W9bJXl6r5KwJglMK/iRlkKiIFfO6ysKs0rDgz7Cwwf3tjldxQUrHL9INT/1r4VA0n9L/F1vQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz", + "integrity": "sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==", "cpu": [ "arm64" ], @@ -1367,9 +1436,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.6.1.tgz", - "integrity": "sha512-YEeOjxRyEjqcWphH9dyLbzgkF8wZSKAKUkldRY6dgNR5oKs2LZazqGB41cWJ4Iqqcy9/zqYgmzBkRoVz3Q9MLw==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz", + "integrity": "sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==", "cpu": [ "ia32" ], @@ -1380,9 +1449,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.6.1.tgz", - "integrity": "sha512-0zfTlFAIhgz8V2G8STq8toAjsYYA6eci1hnXuyOTUFnymrtJwnS6uGKiv3v5UrPZkBlamLvrLV2iiaeqCKzb0A==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz", + "integrity": "sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==", "cpu": [ "x64" ], @@ -1406,9 +1475,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.7", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", - "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" @@ -1425,9 +1494,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.4", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", - "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" @@ -1441,10 +1510,16 @@ "@types/ms": "*" } }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "node_modules/@types/hast": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", - "integrity": "sha512-aMIqAlFd2wTIDZuvLbhUT+TGvMxrNC8ECUIVtH6xxy0sQLs3iu6NO8Kp/VT5je7i5ufnebXzdV1dNDMnvaH6IQ==", + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", + "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", "dependencies": { "@types/unist": "^2" } @@ -1463,9 +1538,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.10.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", - "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -1477,17 +1552,16 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, "node_modules/@types/prop-types": { - "version": "15.7.11", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", - "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" + "version": "15.7.12", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", + "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.1.tgz", + "integrity": "sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", "csstype": "^3.0.2" } }, @@ -1499,11 +1573,6 @@ "@types/react": "*" } }, - "node_modules/@types/scheduler": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz", - "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==" - }, "node_modules/@types/unist": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", @@ -1589,9 +1658,9 @@ "dev": true }, "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", "dev": true, "funding": [ { @@ -1608,9 +1677,9 @@ } ], "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -1661,12 +1730,15 @@ "dev": true }, "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==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -1698,9 +1770,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -1717,8 +1789,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -1750,9 +1822,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001566", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001566.tgz", - "integrity": "sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==", + "version": "1.0.30001614", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", + "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", "dev": true, "funding": [ { @@ -1885,9 +1957,9 @@ } }, "node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "engines": { "node": ">=6" } @@ -1947,9 +2019,9 @@ } }, "node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/debug": { "version": "4.3.4", @@ -2017,9 +2089,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.607", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.607.tgz", - "integrity": "sha512-YUlnPwE6eYxzwBnFmawA8LiLRfm70R2aJRIUv0n03uHt/cUzzYACOogmvk8M2+hVzt/kB80KJXx7d5f5JofPvQ==", + "version": "1.4.752", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.752.tgz", + "integrity": "sha512-P3QJreYI/AUTcfBVrC4zy9KvnZWekViThgQMX/VpJ+IsOBbcX5JFpORM4qWapwWQ+agb2nYAOyn/4PMXOk0m2Q==", "dev": true }, "node_modules/emoji-regex": { @@ -2037,9 +2109,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.8.tgz", - "integrity": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -2049,34 +2121,35 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.8", - "@esbuild/android-arm64": "0.19.8", - "@esbuild/android-x64": "0.19.8", - "@esbuild/darwin-arm64": "0.19.8", - "@esbuild/darwin-x64": "0.19.8", - "@esbuild/freebsd-arm64": "0.19.8", - "@esbuild/freebsd-x64": "0.19.8", - "@esbuild/linux-arm": "0.19.8", - "@esbuild/linux-arm64": "0.19.8", - "@esbuild/linux-ia32": "0.19.8", - "@esbuild/linux-loong64": "0.19.8", - "@esbuild/linux-mips64el": "0.19.8", - "@esbuild/linux-ppc64": "0.19.8", - "@esbuild/linux-riscv64": "0.19.8", - "@esbuild/linux-s390x": "0.19.8", - "@esbuild/linux-x64": "0.19.8", - "@esbuild/netbsd-x64": "0.19.8", - "@esbuild/openbsd-x64": "0.19.8", - "@esbuild/sunos-x64": "0.19.8", - "@esbuild/win32-arm64": "0.19.8", - "@esbuild/win32-ia32": "0.19.8", - "@esbuild/win32-x64": "0.19.8" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -2258,9 +2331,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -2300,9 +2373,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/immutable": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", - "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.5.tgz", + "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", "dev": true }, "node_modules/import-fresh": { @@ -3391,8 +3464,7 @@ "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 + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -3407,9 +3479,9 @@ } }, "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -3428,7 +3500,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -3474,9 +3546,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/property-information": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.0.tgz", - "integrity": "sha512-9t5qARVofg2xQqKtytzt+lZ4d1Qvj8t5B8fEwXK6qOfgRLgH/b13QlgEyDh033NOS31nXeFbYv7CLUDG1CeifQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", + "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -3502,9 +3574,9 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -3513,21 +3585,21 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/react-markdown": { "version": "8.0.7", @@ -3560,9 +3632,9 @@ } }, "node_modules/react-refresh": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", - "integrity": "sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==", + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3596,9 +3668,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/remark-parse": { "version": "10.0.2", @@ -3686,10 +3758,13 @@ "dev": true }, "node_modules/rollup": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.6.1.tgz", - "integrity": "sha512-jZHaZotEHQaHLgKr8JnQiDT1rmatjgKlMekyksz+yk9jt/8z9quNjnKNRoaM0wd9DC2QKXjmWWuDYtM3jfF8pQ==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", + "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -3698,18 +3773,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.6.1", - "@rollup/rollup-android-arm64": "4.6.1", - "@rollup/rollup-darwin-arm64": "4.6.1", - "@rollup/rollup-darwin-x64": "4.6.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.6.1", - "@rollup/rollup-linux-arm64-gnu": "4.6.1", - "@rollup/rollup-linux-arm64-musl": "4.6.1", - "@rollup/rollup-linux-x64-gnu": "4.6.1", - "@rollup/rollup-linux-x64-musl": "4.6.1", - "@rollup/rollup-win32-arm64-msvc": "4.6.1", - "@rollup/rollup-win32-ia32-msvc": "4.6.1", - "@rollup/rollup-win32-x64-msvc": "4.6.1", + "@rollup/rollup-android-arm-eabi": "4.17.2", + "@rollup/rollup-android-arm64": "4.17.2", + "@rollup/rollup-darwin-arm64": "4.17.2", + "@rollup/rollup-darwin-x64": "4.17.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.17.2", + "@rollup/rollup-linux-arm-musleabihf": "4.17.2", + "@rollup/rollup-linux-arm64-gnu": "4.17.2", + "@rollup/rollup-linux-arm64-musl": "4.17.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2", + "@rollup/rollup-linux-riscv64-gnu": "4.17.2", + "@rollup/rollup-linux-s390x-gnu": "4.17.2", + "@rollup/rollup-linux-x64-gnu": "4.17.2", + "@rollup/rollup-linux-x64-musl": "4.17.2", + "@rollup/rollup-win32-arm64-msvc": "4.17.2", + "@rollup/rollup-win32-ia32-msvc": "4.17.2", + "@rollup/rollup-win32-x64-msvc": "4.17.2", "fsevents": "~2.3.2" } }, @@ -3745,9 +3824,9 @@ ] }, "node_modules/sass": { - "version": "1.69.5", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", - "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", + "version": "1.76.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.76.0.tgz", + "integrity": "sha512-nc3LeqvF2FNW5xGF1zxZifdW3ffIz5aBb7I7tSvOoNu7z1RQ6pFt9MBuiPtjgaI62YWrM/txjWlOCFiGtf2xpw==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -3783,9 +3862,9 @@ "dev": true }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } @@ -3845,9 +3924,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3964,9 +4043,9 @@ } }, "node_modules/trough": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/trough/-/trough-2.1.0.tgz", - "integrity": "sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", + "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -4069,9 +4148,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.14.tgz", + "integrity": "sha512-JixKH8GR2pWYshIPUg/NujK3JO7JiqEEUiNArE86NQyrgUuZeTlZQN3xuS/yiV5Kb48ev9K6RqNkaJjXsdg7Jw==", "dev": true, "funding": [ { @@ -4088,7 +4167,7 @@ } ], "dependencies": { - "escalade": "^3.1.1", + "escalade": "^3.1.2", "picocolors": "^1.0.0" }, "bin": { @@ -4099,9 +4178,9 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", + "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -4162,14 +4241,14 @@ } }, "node_modules/vite": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.6.tgz", - "integrity": "sha512-MD3joyAEBtV7QZPl2JVVUai6zHms3YOmLR+BpMzLlX2Yzjfcc4gTgNi09d/Rua3F4EtC8zdwPU8eQYyib4vVMQ==", + "version": "5.2.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.10.tgz", + "integrity": "sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==", "dev": true, "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.32", - "rollup": "^4.2.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" diff --git a/package.json b/package.json index e8ad34f..399590b 100644 --- a/package.json +++ b/package.json @@ -14,25 +14,25 @@ "build": "dotnet fable src/Client -o dist -e .jsx && npm run init-assets && vite build --outDir ./../deploy" }, "devDependencies": { - "@types/node": "^20.9.1", - "@vitejs/plugin-react": "^4.2.0", - "autoprefixer": "^10.4.16", - "mocha": "^8.3.2", - "postcss": "^8.4.31", + "@types/node": "^20.12.7", + "@vitejs/plugin-react": "^4.2.1", + "autoprefixer": "^10.4.19", + "mocha": "^8.4.0", + "postcss": "^8.4.38", "remotedev": "^0.2.9", - "sass": "^1.69.5", - "vite": "^5.0.0" + "sass": "^1.76.0", + "vite": "^5.2.10" }, "dependencies": { - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.5", "@fontsource/roboto": "^4.5.8", - "@mui/icons-material": "^5.11.11", - "@mui/material": "^5.11.11", - "@mui/x-data-grid": "^6.0.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-markdown": "^8.0.5", - "use-sync-external-store": "^1.2.0" + "@mui/icons-material": "^5.15.15", + "@mui/material": "^5.15.15", + "@mui/x-data-grid": "^6.19.11", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-markdown": "^8.0.7", + "use-sync-external-store": "^1.2.2" } } diff --git a/src/Client/Views/Prescribe.fs b/src/Client/Views/Prescribe.fs index 1e7bf5d..c1f437b 100644 --- a/src/Client/Views/Prescribe.fs +++ b/src/Client/Views/Prescribe.fs @@ -182,7 +182,7 @@ module Prescribe = {| scenarios: Deferred updateScenario: Types.ScenarioResult -> unit - selectOrder : (Types.Scenario * Shared.Types.Order option) -> unit + selectOrder : (Types.Scenario * Types.Order option) -> unit order: Deferred<(bool * string option * Order) option> loadOrder: (string option * Order) -> unit updateScenarioOrder : unit -> unit @@ -292,10 +292,29 @@ module Prescribe = else $"{s} {sc.Shape} {dt}" - let ord = - sc.Order + let ord = sc.Order let item icon prim sec = + let rows = + let cells row = + row + |> Array.map (fun cell -> + JSX.jsx $""" + + {cell |> typoGraphy} + + """ + ) + + sec + |> Array.map (fun row -> + JSX.jsx $""" + + {cells row} + + """ + ) + JSX.jsx $""" import Table from '@mui/material/Table'; @@ -308,20 +327,18 @@ module Prescribe = {icon} - - - - - {prim} - - - - - {sec |> typoGraphy} - - - -
+ + + + + + {prim} + + + {rows} + +
+
""" @@ -332,7 +349,7 @@ module Prescribe = {med} - + { [| item Mui.Icons.Notes (Terms.``Prescribe Prescription`` |> getTerm "Voorschrift") sc.Prescription @@ -392,7 +409,7 @@ module Prescribe = - + {Terms.``Prescribe Scenarios`` |> getTerm "Medicatie scenario's"} { diff --git a/src/Informedica.GenForm.Lib/Filter.fs b/src/Informedica.GenForm.Lib/Filter.fs index 597e11e..8869bb4 100644 --- a/src/Informedica.GenForm.Lib/Filter.fs +++ b/src/Informedica.GenForm.Lib/Filter.fs @@ -26,6 +26,7 @@ module Filter = let setPatient (pat : Patient) (filter : Filter) = let pat = pat + |> Patient.correctAdjustUnit |> Patient.calcPMAge { filter with diff --git a/src/Informedica.GenForm.Lib/Patient.fs b/src/Informedica.GenForm.Lib/Patient.fs index 612c11a..33c1c7c 100644 --- a/src/Informedica.GenForm.Lib/Patient.fs +++ b/src/Informedica.GenForm.Lib/Patient.fs @@ -329,6 +329,14 @@ module Patient = } + let correctAdjustUnit (pat : Patient) = + { pat with + Weight = + pat.Weight + |> Option.map (ValueUnit.convertTo Units.Weight.kiloGram) + } + + let calcPMAge (pat: Patient) = { pat with PMAge = diff --git a/src/Informedica.GenOrder.Lib/Api.fs b/src/Informedica.GenOrder.Lib/Api.fs index dc16ad6..d2a036a 100644 --- a/src/Informedica.GenOrder.Lib/Api.fs +++ b/src/Informedica.GenOrder.Lib/Api.fs @@ -190,7 +190,7 @@ module Api = Ok (ord, pr) | Error (ord, _) when tryAgain && ord.Prescription |> Prescription.isContinuous |> not - -> + -> { pr with DoseRule = { pr.DoseRule with @@ -346,7 +346,7 @@ module Api = let prs, prp, adm = ord - |> Order.Print.printOrderToMd useAdjust ns + |> Order.Print.printOrderToTableFormat useAdjust true ns { No = i @@ -355,9 +355,9 @@ module Api = Name = pr.DoseRule.Generic Shape = pr.DoseRule.Shape Route = pr.DoseRule.Route - Prescription = prs |> replace - Preparation =prp |> replace - Administration = adm |> replace + Prescription = prs |> Array.map (Array.map replace) + Preparation = prp |> Array.map (Array.map replace) + Administration = adm |> Array.map (Array.map replace) Order = Some ord UseAdjust = useAdjust } @@ -391,11 +391,16 @@ module Api = if prs |> Array.length <= 1 then prs else if prs - |> Array.filter (fun pr -> pr.Preparation |> String.notEmpty) + |> Array.filter (fun pr -> + pr.Preparation + |> Array.exists (Array.exists String.notEmpty)) |> Array.length = 0 then prs else prs - |> Array.filter (fun pr -> pr.Preparation |> String.notEmpty) + |> Array.filter (fun pr -> + pr.Preparation + |> Array.exists (Array.exists String.notEmpty) + ) |] |> Array.collect id diff --git a/src/Informedica.GenOrder.Lib/Informedica.GenOrder.Lib.fsproj b/src/Informedica.GenOrder.Lib/Informedica.GenOrder.Lib.fsproj index 295146a..1cab6db 100644 --- a/src/Informedica.GenOrder.Lib/Informedica.GenOrder.Lib.fsproj +++ b/src/Informedica.GenOrder.Lib/Informedica.GenOrder.Lib.fsproj @@ -25,6 +25,7 @@ + diff --git a/src/Informedica.GenOrder.Lib/Order.fs b/src/Informedica.GenOrder.Lib/Order.fs index 4537106..0c057bf 100644 --- a/src/Informedica.GenOrder.Lib/Order.fs +++ b/src/Informedica.GenOrder.Lib/Order.fs @@ -2,6 +2,7 @@ namespace Informedica.GenOrder.Lib + /// Types and functions that deal with an order. /// An `Order` models the `Prescription` of an /// `Orderable` with a `StartStop` start date and @@ -391,6 +392,123 @@ module Order = let toString = toOrdVars >> List.map (OrderVariable.toString false) + module Print = + + let quantityTo toStr (d : Dose) = + d.Quantity + |> toStr + + + let doseQuantityToString prec = + quantityTo (Quantity.toValueUnitString prec) + + + let doseQuantityToMd prec = + quantityTo (Quantity.toValueUnitMarkdown prec) + + + let quantityAdjustTo toStr (d : Dose) = + d.QuantityAdjust + |> toStr + + let doseQuantityAdjustToString prec = + quantityAdjustTo (QuantityAdjust.toValueUnitString prec) + + + let doseQuantityAdjustToMd prec = + quantityAdjustTo (QuantityAdjust.toValueUnitMarkdown prec) + + + let perTimeTo toStr (d : Dose) = + d.PerTime + |> toStr + + + let dosePerTimeToString prec = + perTimeTo (PerTime.toValueUnitString prec) + + + let dosePerTimeToMd prec = + perTimeTo (PerTime.toValueUnitMarkdown prec) + + + let perTimeAdjustTo toStr (d : Dose) = + d.PerTimeAdjust + |> toStr + + + let dosePerTimeAdjustToString prec = + perTimeAdjustTo (PerTimeAdjust.toValueUnitString prec) + + + let dosePerTimeAdjustToMd prec = + perTimeAdjustTo (PerTimeAdjust.toValueUnitMarkdown prec) + + + let rateTo toStr (d : Dose) = + d.Rate + |> toStr + + + let doseRateToString prec = + rateTo (Rate.toValueUnitString prec) + + + let doseRateToMd prec = + rateTo (Rate.toValueUnitMarkdown prec) + + + let rateAdjustTo toStr (d : Dose) = + d.RateAdjust + |> toStr + + + let doseRateAdjustToString prec = + rateAdjustTo (RateAdjust.toValueUnitString prec) + + + let doseRateAdjustToMd prec = + rateAdjustTo (RateAdjust.toValueUnitMarkdown prec) + + + let doseConstraints get prec (d: Dose) = + d + |> get + |> (_.Constraints) + |> OrderVariable.Constraints.toMinMaxString prec + + + let doseQuantityConstraints = + fun d -> d.Quantity |> Quantity.toOrdVar + |> doseConstraints + + + let doseQuantityAdjustConstraints = + fun d -> d.QuantityAdjust |> QuantityAdjust.toOrdVar + |> doseConstraints + + + let dosePerTimeConstraints = + fun d -> d.PerTime |> PerTime.toOrdVar + |> doseConstraints + + + let dosePerTimeAdjustConstraints = + fun d -> d.PerTimeAdjust |> PerTimeAdjust.toOrdVar + |> doseConstraints + + + let doseRateConstraints = + fun d -> d.Rate |> Rate.toOrdVar + |> doseConstraints + + + let doseRateAdjustConstraints = + fun d -> d.RateAdjust |> RateAdjust.toOrdVar + |> doseConstraints + + + /// Functions to create a Dose Dto and vice versa. module Dto = @@ -601,6 +719,106 @@ module Order = let toString = toOrdVars >> List.map (OrderVariable.toString false) + module Print = + + + let private getToStr get toStr (i : Item) = + i + |> get + |> toStr + + + let itemComponentConcentrationToString = + getToStr + (_.ComponentConcentration) + (Concentration.toValueUnitString -1) + + + let itemComponentConcentrationToMd = + getToStr + (_.ComponentConcentration) + (Concentration.toValueUnitMarkdown -1) + + + let itemOrderableConcentrationToString = + getToStr + (_.OrderableConcentration) + (Concentration.toValueUnitString -1) + + + let itemOrderableConcentrationToMd = + getToStr + (_.OrderableConcentration) + (Concentration.toValueUnitMarkdown -1) + + + + let itemOrderableQuantityToString = + getToStr + (_.OrderableQuantity) + (Quantity.toValueUnitString -1) + + + let itemOrderableQuantityToMd = + getToStr + (_.OrderableQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let doseTo toStr (i : Item) = + i.Dose + |> toStr + + + let itemDoseQuantityToString = + doseTo (Dose.Print.doseQuantityToString 3) + + + let itemDoseQuantityToMd = + doseTo (Dose.Print.doseQuantityToMd 3) + + + let itemDoseQuantityAdjustToString = + doseTo (Dose.Print.doseQuantityAdjustToString 3) + + + let itemDoseQuantityAdjustToMd = + doseTo (Dose.Print.doseQuantityAdjustToMd 3) + + + let itemDosePerTimeToString = + doseTo (Dose.Print.dosePerTimeToString 3) + + + let itemDosePerTimeToMd = + doseTo (Dose.Print.dosePerTimeToMd 3) + + + let itemDosePerTimeAdjustToString = + doseTo (Dose.Print.dosePerTimeAdjustToString 3) + + + let itemDosePerTimeAdjustToMd = + doseTo (Dose.Print.dosePerTimeAdjustToMd 3) + + + let itemDoseRateToString = + doseTo (Dose.Print.doseRateToString 3) + + + let itemDoseRateToMd = + doseTo (Dose.Print.doseRateToMd 3) + + + let itemDoseRateAdjustToString = + doseTo (Dose.Print.doseRateAdjustToString 3) + + + let itemDoseRateAdjustToMd = + doseTo (Dose.Print.doseRateAdjustToMd 3) + + + /// Functions to create a Item Dto and vice versa. module Dto = @@ -666,6 +884,9 @@ module Order = + + + /// Types and functions to model a /// `Component` in an `Orderable`. /// A `Component` contains a list @@ -857,6 +1078,149 @@ module Order = let toString = toOrdVars >> List.map (OrderVariable.toString false) + + module Print = + + + let quantityTo get toStr (c : Component) = + c + |> get + |> toStr + + + let componentQuantityToString = + quantityTo + (_.ComponentQuantity) + (Quantity.toValueUnitString -1) + + + let componentQuantityToMd = + quantityTo + (_.ComponentQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let componentOrderableQuantityToString = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitString -1) + + + let componentOrderableQuantityToMd = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let componentOrderQuantityToString prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitString prec) + + + let componentOrderQuantityToMd prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitMarkdown prec) + + + let countTo get toStr (c : Component) = + c + |> get + |> toStr + + + let componentOrderableCountToString prec = + countTo + (_.OrderableCount) + (Count.toValueUnitString prec) + + + let componentOrderableCountToMd prec = + countTo + (_.OrderableCount) + (Count.toValueUnitMarkdown prec) + + + let componentOrderCountToString prec = + countTo + (_.OrderCount) + (Count.toValueUnitString prec) + + + let componentOrderCountToMd prec = + countTo + (_.OrderCount) + (Count.toValueUnitMarkdown prec) + + + let componentOrderableConcentrationTo toStr (c : Component) = + c.OrderableConcentration + |> toStr + + + let componentOrderableConcentrationToString prec = + componentOrderableConcentrationTo (Concentration.toValueUnitString prec) + + + let componentOrderableConcentrationToMd prec = + componentOrderableConcentrationTo (Concentration.toValueUnitMarkdown prec) + + + let doseTo toStr (c : Component) = + c.Dose + |> toStr + + + let componentDoseQuantityToString = + doseTo (Dose.Print.doseQuantityToString -1) + + + let componentDoseQuantityToMd = + doseTo (Dose.Print.doseQuantityToMd -1) + + + let componentDoseQuantityAdjustToString prec = + doseTo (Dose.Print.doseQuantityAdjustToString prec) + + + let componentDoseQuantityAdjustToMd prec = + doseTo (Dose.Print.doseQuantityAdjustToMd prec) + + + let componentDosePerTimeToString prec = + doseTo (Dose.Print.dosePerTimeToString prec) + + + let componentDosePerTimeToMd prec = + doseTo (Dose.Print.dosePerTimeToMd prec) + + + let componentDosePerTimeAdjustToString prec = + doseTo (Dose.Print.dosePerTimeAdjustToString prec) + + + let componentDosePerTimeAdjustToMd prec = + doseTo (Dose.Print.dosePerTimeAdjustToMd prec) + + + let componentDoseRateToString prec = + doseTo (Dose.Print.doseRateToString prec) + + + let componentDoseRateToMd prec = + doseTo (Dose.Print.doseRateToMd prec) + + + let componentDoseRateAdjustToString prec = + doseTo (Dose.Print.doseRateAdjustToString prec) + + + let componentDoseRateAdjustToMd prec = + doseTo (Dose.Print.doseRateAdjustToMd prec) + + + /// Helper functions for the Component Dto module Dto = @@ -948,6 +1312,7 @@ module Order = + module Quantity = OrderVariable.Quantity module Concentration = OrderVariable.Concentration module Count = OrderVariable.Count @@ -1173,6 +1538,111 @@ module Order = } + module Print = + + + let quantityTo get toStr (o : Orderable) = + o + |> get + |> toStr + + + let orderableQuantityToString = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitString -1) + + + let orderableQuantityToMd = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let orderQuantityToString prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitString prec) + + + let orderQuantityToMd prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitMarkdown prec) + + + let countTo get toStr (o : Orderable) = + o + |> get + |> toStr + + + let orderCountToString prec = + countTo + (_.OrderCount) + (Count.toValueUnitString prec) + + + let orderCountToMd prec = + countTo + (_.OrderCount) + (Count.toValueUnitMarkdown prec) + + + let doseTo toStr (o : Orderable) = + o.Dose + |> toStr + + + let doseQuantityToString = + doseTo (Dose.Print.doseQuantityToString -1) + + + let doseQuantityToMd = + doseTo (Dose.Print.doseQuantityToMd -1) + + + let doseQuantityAdjustToString prec = + doseTo (Dose.Print.doseQuantityAdjustToString prec) + + + let doseQuantityAdjustToMd prec = + doseTo (Dose.Print.doseQuantityAdjustToMd prec) + + + let dosePerTimeToString prec = + doseTo (Dose.Print.dosePerTimeToString prec) + + + let dosePerTimeToMd prec = + doseTo (Dose.Print.dosePerTimeToMd prec) + + + let dosePerTimeAdjustToString prec = + doseTo (Dose.Print.dosePerTimeAdjustToString prec) + + + let dosePerTimeAdjustToMd prec = + doseTo (Dose.Print.dosePerTimeAdjustToMd prec) + + + let doseRateToString = + doseTo (Dose.Print.doseRateToString -1) + + + let doseRateToMd = + doseTo (Dose.Print.doseRateToMd -1) + + + let doseRateAdjustToString prec = + doseTo (Dose.Print.doseRateAdjustToString prec) + + + let doseRateAdjustToMd prec = + doseTo (Dose.Print.doseRateAdjustToMd prec) + + + /// Helper functions for the Orderable Dto module Dto = @@ -1289,6 +1759,18 @@ module Order = let frq, tme = n |> freqTime tu1 tu2 in (frq, tme) |> Timed + /// Check whether a `Prescription` is Once + let isOnce = function | Once -> true | _ -> false + + + /// Check whether a `Prescription` is Once + let isOnceTimed = function | OnceTimed _ -> true | _ -> false + + + /// Check whether a `Prescription` is Discontinuous + let isDiscontinuous = function | Discontinuous _ -> true | _ -> false + + /// Check whether a `Prescription` is Continuous let isContinuous = function | Continuous -> true | _ -> false @@ -1297,6 +1779,14 @@ module Order = let isTimed = function | Timed _ -> true | _ -> false + let hasFrequency pr = + pr |> isDiscontinuous || pr |> isTimed + + + let hasTime pr = + pr |> isTimed || pr |> isOnceTimed + + /// /// Return a Prescription as a Frequency OrderVariable option /// and a Time OrderVariable option @@ -1371,6 +1861,57 @@ module Order = + module Print = + + + let frequencyTo toStr (p : Prescription) = + match p with + | Discontinuous frq -> frq |> toStr + | _ -> "" + + + let frequencyToString = + frequencyTo (Frequency.toValueUnitString -1) + + + let frequencyToMd = + frequencyTo (Frequency.toValueUnitMarkdown -1) + + + let timeTo toStr (p : Prescription) = + match p with + | OnceTimed tme -> tme |> toStr + | Timed (_, tme) -> tme |> toStr + | _ -> "" + + + let timeToString prec = + timeTo (Time.toValueUnitString prec) + + + let timeToMd prec = + timeTo (Time.toValueUnitMarkdown prec) + + + let prescriptionToString (p : Prescription) = + match p with + | Once -> "eenmalig" + | Continuous -> "continu" + | OnceTimed _ -> p |> timeToMd -1 + | Discontinuous _ -> p |> frequencyToString + | Timed _ -> $"{p |> frequencyToString} {p |> timeToString -1}" + + + let prescriptionToMd (p : Prescription) = + match p with + | Once -> "eenmalig" + | Continuous -> "continu" + | OnceTimed _ -> p |> timeToMd -1 + | Discontinuous _ -> p |> frequencyToMd + | Timed _ -> $"{p |> frequencyToMd} {p |> timeToMd -1}" + + + /// Helper functions for the Prescription Dto module Dto = @@ -2014,6 +2555,8 @@ module Order = module Print = + open Informedica.GenOrder.Lib + let itemConcentrationTo toStr (c : Component) = c.Items @@ -2382,6 +2925,284 @@ module Order = adm + let printOrderToTableFormat + useAdj + printMd + sns (ord : Order) = + + let findItem sn = + ord.Orderable.Components + |> List.collect (_.Items) + |> List.tryFind (fun i -> i.Name |> Name.toString |> String.equalsCapInsens sn) + + let itms = + sns + |> Array.filter String.notEmpty + |> Array.choose findItem + + let withBrackets s = $"({s})" + + let pres = + match ord.Prescription with + | Continuous -> + if itms |> Array.isEmpty then + [| + [| + // the orderable dose quantity + ord.Orderable + |> Orderable.Print.doseQuantityToMd + // the orderable dose adjust quantity + if useAdj then + ord.Orderable + |> Orderable.Print.doseQuantityAdjustToMd -1 + + |] + |] + else + itms + |> Array.map (fun itm -> + [| + // item dose per rate + if useAdj then + itm + |> Orderable.Item.Print.itemDoseRateAdjustToMd + + if itm.Dose.RateAdjust |> RateAdjust.isSolved then + itm.Dose |> Dose.Print.doseRateAdjustConstraints -3 + |> withBrackets + else + itm + |> Orderable.Item.Print.itemDoseRateToMd + + if itm.Dose.Rate |> Rate.isSolved then + itm.Dose |> Dose.Print.doseRateConstraints -3 + |> withBrackets + |] + ) + + | Discontinuous _ + | Timed _ -> + if itms |> Array.isEmpty then + [| + [| + // the frequency + ord.Prescription |> Prescription.Print.frequencyToMd + // the orderable dose quantity + ord.Orderable + |> + Orderable.Print.doseQuantityToMd + // the orderable dose adjust quantity + "=" + if useAdj then + ord.Orderable + |> Orderable.Print.dosePerTimeAdjustToMd -1 + else + ord.Orderable + |> Orderable.Print.dosePerTimeToMd -1 + + |] + |] + else + itms + |> Array.mapi (fun i itm -> + [| + // the frequency + if i = 0 then + ord.Prescription |> Prescription.Print.frequencyToMd + else "" + // the name of the item + itm.Name |> Name.toString + // the item dose quantity + itm + |> Orderable.Item.Print.itemDoseQuantityToMd + + "=" + if useAdj then + itm + |> Orderable.Item.Print.itemDosePerTimeAdjustToMd + + if itm.Dose.PerTimeAdjust |> PerTimeAdjust.isSolved then + itm.Dose |> Dose.Print.dosePerTimeAdjustConstraints -3 + |> withBrackets + else + itm + |> Orderable.Item.Print.itemDosePerTimeToMd + + if itm.Dose.PerTime |> PerTime.isSolved then + itm.Dose |> Dose.Print.dosePerTimeConstraints -3 + |> withBrackets + |] + ) + + | Once + | OnceTimed _ -> + if itms |> Array.isEmpty then + [| + [| + // the orderable dose quantity + ord.Orderable + |> (if printMd then + Orderable.Print.doseQuantityToMd + else + Orderable.Print.doseQuantityToString) + // the orderable dose adjust quantity + if useAdj then + "=" + ord.Orderable + |> Orderable.Print.doseQuantityAdjustToMd -1 + + |] + |] + else + itms + |> Array.map (fun itm -> + [| + itm.Name |> Name.toString + // the item dose quantity + itm + |> Orderable.Item.Print.itemDoseQuantityToMd + + // the item dose adjust quantity + if useAdj then + "=" + itm + |> Orderable.Item.Print.itemDoseQuantityAdjustToMd + + if itm.Dose.QuantityAdjust |> QuantityAdjust.isSolved then + itm.Dose |> Dose.Print.doseQuantityAdjustConstraints -3 + |> withBrackets + + else + if itm.Dose.Quantity |> Quantity.isSolved then + itm.Dose |> Dose.Print.doseQuantityConstraints -3 + |> withBrackets + + |] + ) + + let prep = + ord.Orderable.Components + |> List.toArray + |> Array.mapi (fun i1 c -> + [| + if c.Items |> List.isEmpty then + [| + [| + c.Shape + c |> Orderable.Component.Print.componentOrderableQuantityToMd + "" + "" + |] + |] + else + c.Items + |> List.toArray + |> Array.mapi (fun i2 itm -> + [| + if i1 = 0 && i2 = 0 then + c.Shape + c |> Orderable.Component.Print.componentOrderableQuantityToMd + else + "" + "" + + itm.Name |> Name.toString + itm |> Orderable.Item.Print.itemComponentConcentrationToMd + |] + ) + + |] + ) + |> Array.collect id + |> Array.collect id + + let adm = + match ord.Prescription with + | Once + | OnceTimed _ + | Discontinuous _ + | Timed _ -> + if itms |> Array.isEmpty then + [| + [| + // the frequency + if ord.Prescription |> Prescription.hasFrequency then ord.Prescription |> Prescription.Print.frequencyToMd + + ord.Orderable + |> Orderable.Print.doseQuantityToMd + // if timed add rate and time + if ord.Prescription |> Prescription.hasTime then + ord.Orderable |> Orderable.Print.doseRateToMd + ord.Prescription |> Prescription.Print.timeToMd -1 + |] + |] + else + itms + |> Array.mapi (fun i itm -> + [| + // the frequency + if ord.Prescription |> Prescription.hasFrequency then + if i = 0 then + ord.Prescription |> Prescription.Print.frequencyToMd + else "" + + itm.Name |> Name.toString + itm |> Orderable.Item.Print.itemOrderableQuantityToMd + + if i = 0 then + "in" + ord.Orderable |> Orderable.Print.orderableQuantityToMd + else + "" + "" + + // if timed then add rate and time + if ord.Prescription |> Prescription.hasTime then + if i = 0 then + "=" + ord.Orderable |> Orderable.Print.doseRateToMd + ord.Prescription |> Prescription.Print.timeToMd -1 + |> withBrackets + else + "" + "" + "" + |] + ) + | Continuous -> + if itms |> Array.isEmpty then + [| + [| + ord.Orderable |> Orderable.Print.orderableQuantityToMd + ord.Orderable |> Orderable.Print.doseRateToMd + |] + |] + else + itms + |> Array.mapi (fun i itm -> + [| + itm.Name |> Name.toString + itm |> Orderable.Item.Print.itemOrderableQuantityToMd + + if i = 0 then + "in" + ord.Orderable |> Orderable.Print.orderableQuantityToMd + "=" + ord.Orderable |> Orderable.Print.doseRateToMd + else + "" + "" + "" + "" + |] + ) + + pres + , prep + , adm + + + /// /// Print an Order to a string using an array of strings /// to pick the Orderable Items to print. @@ -2600,5 +3421,3 @@ module Order = - - diff --git a/src/Informedica.GenOrder.Lib/OrderVariable.fs b/src/Informedica.GenOrder.Lib/OrderVariable.fs index 4d0a720..8f72993 100644 --- a/src/Informedica.GenOrder.Lib/OrderVariable.fs +++ b/src/Informedica.GenOrder.Lib/OrderVariable.fs @@ -1140,6 +1140,9 @@ module OrderVariable = let applyConstraints = toOrdVar >> applyConstraints >> QuantityAdjust + /// Check whether a QuantityAdjust is solved + let isSolved = toOrdVar >> isSolved + /// Type and functions that represent a adjusted total, /// and a adjusted total is a quantity per time @@ -1359,3 +1362,6 @@ module OrderVariable = let applyConstraints = toOrdVar >> applyConstraints >> TotalAdjust + /// Check whether a TotalAdjust is solved + let isSolved = toOrdVar >> isSolved + diff --git a/src/Informedica.GenOrder.Lib/Scripts/Api2.fsx b/src/Informedica.GenOrder.Lib/Scripts/Api2.fsx index f709605..b2c6d88 100644 --- a/src/Informedica.GenOrder.Lib/Scripts/Api2.fsx +++ b/src/Informedica.GenOrder.Lib/Scripts/Api2.fsx @@ -222,19 +222,11 @@ let pr = |> Array.item 0 //|> Api.evaluate (OrderLogger.logger.Logger) -Patient.newBorn +Patient.teenager |> fun p -> { p with VenousAccess = [] Department = Some "ICK" - Age = - Units.Time.day - |> ValueUnit.singleWithValue 2N - |> Some - Weight = - Units.Weight.kiloGram - |> ValueUnit.singleWithValue (3N) - |> Some } //|> Api.scenarioResult |> Api.filter //|> fun p -> { p with VenousAccess = CVL; AgeInDays = Some 0N } @@ -504,4 +496,63 @@ Patient.premature } SolutionRule.get () - |> SolutionRule.filter filter \ No newline at end of file + |> SolutionRule.filter filter + + +let gen = "acetylcysteine" +Patient.teenager +|> fun p -> + { p with + VenousAccess = [] + Department = Some "ICK" + (* + Weight = + Units.Weight.gram + |> ValueUnit.singleWithValue (40000N) + |> Some + *) + } +//|> Api.scenarioResult |> Api.filter +//|> fun p -> { p with VenousAccess = CVL; AgeInDays = Some 0N } +|> PrescriptionRule.get +|> Array.filter (fun pr -> pr.DoseRule.Generic = gen) +|> Array.item 0 //|> Api.evaluate (OrderLogger.logger.Logger) +//|> fun pr -> pr |> DrugOrder.createDrugOrder None //|> printfn "%A" +|> fun pr -> pr |> DrugOrder.createDrugOrder (pr.SolutionRules[0] |> Some) //|> printfn "%A" +|> DrugOrder.toOrderDto +|> Order.Dto.fromDto //|> Order.toString |> List.iter (printfn "%s") +|> Order.Dto.toDto +|> Order.Dto.fromDto +|> Order.applyConstraints //|> Order.toString |> List.iter (printfn "%s") +|> fun ord -> + printfn $"constraints applied to: {ord.Orderable.Name |> Name.toString}" + + ord + |> Order.toString + |> String.concat "\n" + |> printfn "%A" + + ord + |> Order.Print.printOrderToTableFormat true true (gen |> String.splitAt '/') + |> printfn "%A" + ord + +|> Order.solveMinMax true OrderLogger.logger.Logger +|> Result.map (fun ord -> + printfn "solve min max" + ord + |> Order.toString + |> String.concat "\n" + |> printfn "%A" + + ord + |> Order.Print.printOrderToTableFormat true true (gen |> String.splitAt '/') + |> printfn "%A" + + ord + |> Order.Print.printOrderToMd true (gen |> String.splitAt '/') + //|> String.concat "\n" + |> printfn "%A" + ord +) |> ignore + diff --git a/src/Informedica.GenOrder.Lib/Scripts/Order.fsx b/src/Informedica.GenOrder.Lib/Scripts/Order.fsx new file mode 100644 index 0000000..43a02ef --- /dev/null +++ b/src/Informedica.GenOrder.Lib/Scripts/Order.fsx @@ -0,0 +1,3138 @@ + +#r "nuget: MathNet.Numerics.FSharp" +#r "nuget: FParsec" +#r "nuget: Newtonsoft.Json" +#r "nuget: Aether" +#r "nuget: Markdig" +#r "nuget: ClosedXML" + + +#r "../../Informedica.Utils.Lib/bin/Debug/net8.0/Informedica.Utils.Lib.dll" +#r "../../Informedica.GenUnits.Lib/bin/Debug/net8.0/Informedica.GenUnits.Lib.dll" +#r "../../Informedica.GenCore.Lib/bin/Debug/net8.0/Informedica.GenCore.Lib.dll" +#r "../../Informedica.GenSolver.Lib/bin/Debug/net8.0/Informedica.GenSolver.Lib.dll" +#r "../../Informedica.GenForm.Lib/bin/Debug/net8.0/Informedica.GenForm.Lib.dll" +#r "../../Informedica.ZIndex.Lib/bin/Debug/net8.0/Informedica.ZIndex.Lib.dll" + +// These can be loaded all at once. + +#load "../Types.fs" +#load "../Utils.fs" +#load "../Logging.fs" +#load "../Exceptions.fs" +#load "../WrappedString.fs" +#load "../ValueUnit.fs" +#load "../Variable.fs" +#load "../OrderVariable.fs" +#load "../Solver.fs" + + +open MathNet.Numerics +open Informedica.GenUnits.Lib +open Informedica.GenOrder.Lib + + +/// Types and functions that deal with an order. +/// An `Order` models the `Prescription` of an +/// `Orderable` with a `StartStop` start date and +/// stop date. +[] +module Order = + + + open System + open Informedica.Utils.Lib + open Informedica.Utils.Lib.BCL + open Informedica.GenUnits.Lib + open WrappedString + + + /// Utility functions to + /// enable mapping of a `Variable`s + /// to an `Order` + module Mapping = + + + let [] qty = OrderVariable.Quantity.name + let [] cnc = OrderVariable.Concentration.name + let [] ptm = OrderVariable.PerTime.name + let [] rte = OrderVariable.Rate.name + let [] tot = OrderVariable.Total.name + let [] qtyAdj = OrderVariable.QuantityAdjust.name + let [] ptmAdj = OrderVariable.PerTimeAdjust.name + let [] rteAdj = OrderVariable.RateAdjust.name + let [] totAdj = OrderVariable.TotalAdjust.name + let [] cnt = OrderVariable.Count.name + let [] frq = OrderVariable.Frequency.name + let [] tme = OrderVariable.Time.name + let [] itm = "itm" //Orderable.Literals.item + let [] cmp = "cmp" //Orderable.Literals.comp + let [] orb = "orb" //Orderable.Literals.orderable + let [] dos = "dos" //Orderable.Literals.dose + let [] prs = "prs" //"Prescription" + let [] ord = "ord" // "Order" + let [] adj = "adj" // "Adjust" + + let [] discontinuous = 3 + let [] continuous = 4 + let [] timed = 5 + let [] once = 6 + let [] onceTimed = 7 + + + let private getEquations_ indx = + Web.getDataFromGenPres "Equations" + |> Array.skip 1 + |> Array.filter (fun xs -> xs[indx] = "x") + |> Array.map (Array.item 1) + |> Array.toList + + + /// + /// Get a string list of Equations and + /// use an index to filter out the relevant equations + /// + /// The index to filter the equations + /// + /// The indx can be 3 for discontinuous equations, 4 for continuous + /// and 5 for timed equations. + /// + let getEquations indx = + indx + |> Memoization.memoize getEquations_ + + + /// + /// Create an Equations mapping for an `Order` + /// + /// The Order to Map + /// The equations as a string list + /// + /// A tuple of `SumMapping` and `ProductMapping` + /// + let getEqsMapping (ord: Order) (eqs : string list) = + let sumEqs = + eqs + |> List.filter (String.contains "sum") + + let prodEqs = + eqs + |> List.filter (String.contains "sum" >> not) + + let itmEqs = + prodEqs + |> List.filter (String.contains "[itm]") + + let cmpEqs = + prodEqs + |> List.filter (fun e -> + itmEqs + |> List.exists ((=) e) + |> not && + e.Contains("[cmp]") + ) + + let orbEqs = + prodEqs + |> List.filter (fun e -> + itmEqs + |> List.exists ((=) e) + |> not && + cmpEqs + |> List.exists((=) e) + |> not + ) + + let idN = [ord.Id |> Id.toString] |> Name.create + let orbN = [ord.Id |> Id.toString; ord.Orderable.Name |> Name.toString] |> Name.create + + ord.Orderable.Components + |> List.fold (fun acc c -> + let cmpN = + [ + yield! orbN |> Name.toStringList + c.Name |> Name.toString + ] + |> Name.create + + let itms = + c.Items + |> List.collect (fun i -> + itmEqs + |> List.map (fun s -> + let itmN = + [ + yield! cmpN |> Name.toStringList + i.Name |> Name.toString + ] + |> Name.create + s + |> String.replace "[cmp]" $"{cmpN |> Name.toString}" + |> String.replace "[itm]" $"{itmN |> Name.toString}" + ) + ) + + let cmps = + cmpEqs + |> List.map (String.replace "[cmp]" $"{cmpN |> Name.toString}") + + acc + |> List.append cmps + |> List.append itms + ) [] + |> fun es -> + let sumEqs = + sumEqs + |> List.map (fun e -> + match e + |> String.replace "sum(" "" + |> String.replace ")" "" + |> String.split " = " with + | [lv; rv] -> + ord.Orderable.Components + |> List.map(fun c -> + let cmpN = + [ + yield! orbN |> Name.toStringList + c.Name |> Name.toString + ] + |> Name.create + + rv + |> String.replace "[cmp]" $"{cmpN |> Name.toString}" + ) + |> String.concat " + " + |> fun s -> $"{lv} = {s}" + | _ -> + ConsoleWriter.writeErrorMessage + $"could not match {e}" + true false + "" + ) + |> List.filter (String.isNullOrWhiteSpace >> not) + |> List.map (String.replace "[orb]" $"{orbN |> Name.toString}") + |> SumMapping + + let prodEqs = + es + |> List.append orbEqs + |> List.append es + |> List.map (String.replace "[orb]" $"{orbN |> Name.toString}") + |> List.map (String.replace "[ord]" $"{idN |> Name.toString}") + |> List.distinct + |> ProductMapping + + sumEqs, prodEqs + + + + /// Types and functions to deal + /// with an `Orderable`, i.e. something + /// that can be ordered. + [] + module Orderable = + + + open Informedica.GenSolver.Lib + + + type Name = Types.Name + + + /// Contains string constants + /// to create `Variable` names + module Literals = + + [] + let item = Mapping.itm + [] + let comp = Mapping.cmp + [] + let orderable = Mapping.orb + [] + let order = Mapping.ord + [] + let dose = Mapping.dos + + + module Dose = + + module Quantity = OrderVariable.Quantity + module PerTime = OrderVariable.PerTime + module Rate = OrderVariable.Rate + module Total = OrderVariable.Total + module QuantityAdjust = OrderVariable.QuantityAdjust + module PerTimeAdjust = OrderVariable.PerTimeAdjust + module RateAdjust = OrderVariable.RateAdjust + module TotalAdjust = OrderVariable.TotalAdjust + + + /// + /// Create a `Dose` with + /// + /// The quantity of the dose + /// The per time of the dose + /// The rate of the dose + /// The total of the dose + /// The quantity adjust of the dose + /// The per time adjust of the dose + /// The rate adjust of the dose + /// The total adjust of the dose + let create + qty + ptm + rte + tot + qty_adj + ptm_adj + rte_adj + tot_adj = + { + Quantity = qty + PerTime = ptm + Rate = rte + Total = tot + QuantityAdjust = qty_adj + PerTimeAdjust = ptm_adj + RateAdjust = rte_adj + TotalAdjust = tot_adj + } + + + /// + /// Create a new `Dose` with + /// + /// The name of the dose + let createNew n = + let un = Unit.NoUnit + let n = n |> Name.add Literals.dose + + let qty = Quantity.create n un + let ptm = PerTime.create n un un + let rte = Rate.create n un un + let tot = Total.create n un + let qty_adj = QuantityAdjust.create n un un + let rte_adj = RateAdjust.create n un un un + let ptm_adj = PerTimeAdjust.create n un un un + let tot_adj = TotalAdjust.create n un un + + create qty ptm rte tot qty_adj ptm_adj rte_adj tot_adj + + + /// + /// Return a Dose as a list of OrderVariables + /// + /// The dose + let toOrdVars (dos : Dose) = + let qty = dos.Quantity |> Quantity.toOrdVar + let ptm = dos.PerTime |> PerTime.toOrdVar + let rte = dos.Rate |> Rate.toOrdVar + let tot = dos.Total |> Total.toOrdVar + let qty_adj = dos.QuantityAdjust |> QuantityAdjust.toOrdVar + let ptm_adj = dos.PerTimeAdjust |> PerTimeAdjust.toOrdVar + let rte_adj = dos.RateAdjust |> RateAdjust.toOrdVar + let tot_adj = dos.TotalAdjust |> TotalAdjust.toOrdVar + + [ + qty + ptm + rte + tot + qty_adj + ptm_adj + rte_adj + tot_adj + ] + + + /// + /// Create a new Dose from a list of OrderVariables using + /// an old Dose. + /// + /// The list of OrderVariables + /// The old Dose + let fromOrdVars ovars (dos: Dose) = + let qty = dos.Quantity |> Quantity.fromOrdVar ovars + let ptm = dos.PerTime |> PerTime.fromOrdVar ovars + let rte = dos.Rate |> Rate.fromOrdVar ovars + let tot = dos.Total |> Total.fromOrdVar ovars + let qty_adj = dos.QuantityAdjust |> QuantityAdjust.fromOrdVar ovars + let ptm_adj = dos.PerTimeAdjust |> PerTimeAdjust.fromOrdVar ovars + let rte_adj = dos.RateAdjust |> RateAdjust.fromOrdVar ovars + let tot_adj = dos.TotalAdjust |> TotalAdjust.fromOrdVar ovars + + create qty ptm rte tot qty_adj ptm_adj rte_adj tot_adj + + + /// + /// Apply constraints to a Dose + /// + /// The Dose + let applyConstraints (dos: Dose) = + let qty = dos.Quantity |> Quantity.applyConstraints + let ptm = dos.PerTime |> PerTime.applyConstraints + let rte = dos.Rate |> Rate.applyConstraints + let tot = dos.Total |> Total.applyConstraints + let qty_adj = dos.QuantityAdjust |> QuantityAdjust.applyConstraints + let ptm_adj = dos.PerTimeAdjust |> PerTimeAdjust.applyConstraints + let rte_adj = dos.RateAdjust |> RateAdjust.applyConstraints + let tot_adj = dos.TotalAdjust |> TotalAdjust.applyConstraints + + create qty ptm rte tot qty_adj ptm_adj rte_adj tot_adj + + + /// + /// Increase the increment of a Dose to a maximum + /// count using a list of increments. + /// + /// The maximum count + /// The list of increments + /// The Dose + let increaseIncrement maxCount incrs (dos: Dose) = + let qty = dos.Quantity + let ptm = dos.PerTime + let rte = dos.Rate |> Rate.increaseIncrement maxCount incrs + let tot = dos.Total + let qty_adj = dos.QuantityAdjust + let ptm_adj = dos.PerTimeAdjust + let rte_adj = dos.RateAdjust + let tot_adj = dos.TotalAdjust + + create qty ptm rte tot qty_adj ptm_adj rte_adj tot_adj + + + let setDoseUnit du (dos : Dose) = + let qty = dos.Quantity |> Quantity.setDoseUnit du + let ptm = dos.PerTime |> PerTime.setDoseUnit du + let rte = dos.Rate |> Rate.setDoseUnit du + let tot = dos.Total |> Total.setDoseUnit du + let qty_adj = dos.QuantityAdjust |> QuantityAdjust.setDoseUnit du + let ptm_adj = dos.PerTimeAdjust |> PerTimeAdjust.setDoseUnit du + let rte_adj = dos.RateAdjust |> RateAdjust.setDoseUnit du + let tot_adj = dos.TotalAdjust |> TotalAdjust.setDoseUnit du + + create qty ptm rte tot qty_adj ptm_adj rte_adj tot_adj + + + /// + /// Create a string list from a Dose where each string is + /// a variable name with the value range and the Unit + /// + let toString = toOrdVars >> List.map (OrderVariable.toString false) + + + module Print = + + let quantityTo toStr (d : Dose) = + d.Quantity + |> toStr + + + let doseQuantityToString prec = + quantityTo (Quantity.toValueUnitString prec) + + + let doseQuantityToMd prec = + quantityTo (Quantity.toValueUnitMarkdown prec) + + + let quantityAdjustTo toStr (d : Dose) = + d.QuantityAdjust + |> toStr + + let doseQuantityAdjustToString prec = + quantityAdjustTo (QuantityAdjust.toValueUnitString prec) + + + let doseQuantityAdjustToMd prec = + quantityAdjustTo (QuantityAdjust.toValueUnitMarkdown prec) + + + let perTimeTo toStr (d : Dose) = + d.PerTime + |> toStr + + + let dosePerTimeToString prec = + perTimeTo (PerTime.toValueUnitString prec) + + + let dosePerTimeToMd prec = + perTimeTo (PerTime.toValueUnitMarkdown prec) + + + let perTimeAdjustTo toStr (d : Dose) = + d.PerTimeAdjust + |> toStr + + + let dosePerTimeAdjustToString prec = + perTimeAdjustTo (PerTimeAdjust.toValueUnitString prec) + + + let dosePerTimeAdjustToMd prec = + perTimeAdjustTo (PerTimeAdjust.toValueUnitMarkdown prec) + + + let rateTo toStr (d : Dose) = + d.Rate + |> toStr + + + let doseRateToString prec = + rateTo (Rate.toValueUnitString prec) + + + let doseRateToMd prec = + rateTo (Rate.toValueUnitMarkdown prec) + + + let rateAdjustTo toStr (d : Dose) = + d.RateAdjust + |> toStr + + + let doseRateAdjustToString prec = + rateAdjustTo (RateAdjust.toValueUnitString prec) + + + let doseRateAdjustToMd prec = + rateAdjustTo (RateAdjust.toValueUnitMarkdown prec) + + + + /// Functions to create a Dose Dto and vice versa. + module Dto = + + + module Units = ValueUnit.Units + module Quantity = OrderVariable.Quantity + module QuantityPerTime = OrderVariable.PerTime + module Rate = OrderVariable.Rate + module Total = OrderVariable.Total + module QuantityAdjust = OrderVariable.QuantityAdjust + module QuantityPerTimeAdjust = OrderVariable.PerTimeAdjust + module RateAdjust = OrderVariable.RateAdjust + module TotalAdjust = OrderVariable.TotalAdjust + + + type Dto () = + member val Quantity = OrderVariable.Dto.dto () with get, set + member val PerTime = OrderVariable.Dto.dto () with get, set + member val Rate = OrderVariable.Dto.dto () with get, set + member val Total = OrderVariable.Dto.dto () with get, set + member val QuantityAdjust = OrderVariable.Dto.dto () with get, set + member val PerTimeAdjust = OrderVariable.Dto.dto () with get, set + member val RateAdjust = OrderVariable.Dto.dto () with get, set + member val TotalAdjust = OrderVariable.Dto.dto () with get, set + + + let fromDto (dto: Dto) = + + let qty = dto.Quantity |> Quantity.fromDto + let ptm = dto.PerTime |> PerTime.fromDto + let rte = dto.Rate |> Rate.fromDto + let tot = dto.Total |> Total.fromDto + let qty_adj = dto.QuantityAdjust |> QuantityAdjust.fromDto + let ptm_adj = dto.PerTimeAdjust |> PerTimeAdjust.fromDto + let rte_adj = dto.RateAdjust |> RateAdjust.fromDto + let tot_adj = dto.TotalAdjust |> TotalAdjust.fromDto + + create qty ptm rte tot qty_adj ptm_adj rte_adj tot_adj + + + let toDto (dos : Dose) = + let dto = Dto () + + dto.Quantity <- dos.Quantity |> Quantity.toDto + dto.PerTime <- dos.PerTime |> PerTime.toDto + dto.Rate <- dos.Rate |> Rate.toDto + dto.Total <- dos.Total |> Total.toDto + dto.QuantityAdjust <- dos.QuantityAdjust |> QuantityAdjust.toDto + dto.PerTimeAdjust <- dos.PerTimeAdjust |> PerTimeAdjust.toDto + dto.RateAdjust <- dos.RateAdjust |> RateAdjust.toDto + dto.TotalAdjust <- dos.TotalAdjust |> TotalAdjust.toDto + + dto + + + let dto () = Dto () + + let clean (dto: Dto) = + dto.Quantity |> OrderVariable.Dto.clean + dto.PerTime |> OrderVariable.Dto.clean + dto.Rate |> OrderVariable.Dto.clean + dto.Total |> OrderVariable.Dto.clean + dto.QuantityAdjust |> OrderVariable.Dto.clean + dto.PerTimeAdjust |> OrderVariable.Dto.clean + dto.RateAdjust |> OrderVariable.Dto.clean + dto.TotalAdjust |> OrderVariable.Dto.clean + + + /// Type and functions that models an + /// `Order` `Item` that is contained in + /// a `Component` + [] + module Item = + + module Quantity = OrderVariable.Quantity + module Concentration = OrderVariable.Concentration + module Total = OrderVariable.Total + module Rate = OrderVariable.Rate + + + /// + /// Create an `Item` with + /// + /// The name of the Item + /// The quantity of the item in the Component + /// The quantity of the item in the Orderable + /// The concentration of the item in the Component + /// The concentration of the item in the Orderable + /// The dose of the item + let create + n + cmp_qty + orb_qty + cmp_cnc + orb_cnc + dos = + { + Name = n + ComponentQuantity = cmp_qty + OrderableQuantity = orb_qty + ComponentConcentration = cmp_cnc + OrderableConcentration = orb_cnc + Dose = dos + } + + + /// + /// Create a new `Item` with + /// + /// The Id of the Item + /// The name of the Orderable + /// The name of the Component + /// The name of the Item + let createNew id orbN cmpN itmN = + let un = Unit.NoUnit + let n = + [ id; orbN; cmpN; itmN ] + |> Name.create + + let cmp_qty = let n = n |> Name.add Literals.comp in Quantity.create n un + let orb_qty = let n = n |> Name.add Literals.orderable in Quantity.create n un + let cmp_cnc = let n = n |> Name.add Literals.comp in Concentration.create n un un + let orb_cnc = let n = n |> Name.add Literals.orderable in Concentration.create n un un + let dos = Dose.createNew n + + create (itmN |> Name.fromString) cmp_qty orb_qty cmp_cnc orb_cnc dos + + + /// Apply **f** to an `item` + let apply f (itm: Item) = itm |> f + + + /// Utility method to facilitate type inference + let get = apply id + + + /// Get the `Name` of an `Item` + let getName itm = (itm |> get).Name + + + /// Get the `Item` dose + let getDose itm = (itm |> get).Dose + + + /// + /// Return an Item as a list of OrderVariables + /// + /// The Item + let toOrdVars itm = + let itm_cmp_qty = (itm |> get).ComponentQuantity |> Quantity.toOrdVar + let itm_orb_qty = itm.OrderableQuantity |> Quantity.toOrdVar + let itm_cmp_cnc = itm.ComponentConcentration |> Concentration.toOrdVar + let itm_orb_cnc = itm.OrderableConcentration |> Concentration.toOrdVar + + [ + itm_cmp_qty + itm_orb_qty + itm_cmp_cnc + itm_orb_cnc + yield! itm.Dose |> Dose.toOrdVars + ] + + + /// + /// Create a new Item from a list of OrderVariables using + /// an old Item. + /// + /// The list of OrderVariables + /// The old Item + let fromOrdVars ovars itm = + let cmp_qty = (itm |> get).ComponentQuantity |> Quantity.fromOrdVar ovars + let orb_qty = itm.OrderableQuantity |> Quantity.fromOrdVar ovars + let cmp_cnc = itm.ComponentConcentration |> Concentration.fromOrdVar ovars + let orb_cnc = itm.OrderableConcentration |> Concentration.fromOrdVar ovars + let dos = itm.Dose |> Dose.fromOrdVars ovars + + create itm.Name cmp_qty orb_qty cmp_cnc orb_cnc dos + + + /// + /// Apply constraints to an Item + /// + /// The Item + let applyConstraints itm = + let cmp_qty = (itm |> get).ComponentQuantity |> Quantity.applyConstraints + let orb_qty = itm.OrderableQuantity |> Quantity.applyConstraints + let cmp_cnc = itm.ComponentConcentration |> Concentration.applyConstraints + let orb_cnc = itm.OrderableConcentration |> Concentration.applyConstraints + let dos = itm.Dose |> Dose.applyConstraints + + create itm.Name cmp_qty orb_qty cmp_cnc orb_cnc dos + + + let setDoseUnit sn du itm = + if itm + |> getName + |> Name.toStringList + |> List.exists ((=) sn) + |> not then itm + else + { itm with Dose = itm.Dose |> Dose.setDoseUnit du } + + + /// + /// Create a string list from a Item where each string is + /// a variable name with the value range and the Unit + /// + let toString = toOrdVars >> List.map (OrderVariable.toString false) + + + module Print = + + + let concentrationTo get toStr (i : Item) = + i + |> get + |> toStr + + + let itemComponentConcentrationToString = + concentrationTo + (_.ComponentConcentration) + (Concentration.toValueUnitString -1) + + + let itemComponentConcentrationToMd = + concentrationTo + (_.ComponentConcentration) + (Concentration.toValueUnitMarkdown -1) + + + let itemOrderableConcentrationToString = + concentrationTo + (_.OrderableConcentration) + (Concentration.toValueUnitString -1) + + + let itemOrderableConcentrationToMd = + concentrationTo + (_.OrderableConcentration) + (Concentration.toValueUnitMarkdown -1) + + + let doseTo toStr (i : Item) = + i.Dose + |> toStr + + + let itemDoseQuantityToString = + doseTo (Dose.Print.doseQuantityToString 3) + + + let itemDoseQuantityToMd = + doseTo (Dose.Print.doseQuantityToMd 3) + + + let itemDoseQuantityAdjustToString = + doseTo (Dose.Print.doseQuantityAdjustToString 3) + + + let itemDoseQuantityAdjustToMd = + doseTo (Dose.Print.doseQuantityAdjustToMd 3) + + + let itemDosePerTimeToString = + doseTo (Dose.Print.dosePerTimeToString 3) + + + let itemDosePerTimeToMd = + doseTo (Dose.Print.dosePerTimeToMd 3) + + + let itemDosePerTimeAdjustToString = + doseTo (Dose.Print.dosePerTimeAdjustToString 3) + + + let itemDosePerTimeAdjustToMd = + doseTo (Dose.Print.dosePerTimeAdjustToMd 3) + + + let itemDoseRateToString = + doseTo (Dose.Print.doseRateToString 3) + + + let itemDoseRateToMd = + doseTo (Dose.Print.doseRateToMd 3) + + + let itemDoseRateAdjustToString = + doseTo (Dose.Print.doseRateAdjustToString 3) + + + let itemDoseRateAdjustToMd = + doseTo (Dose.Print.doseRateAdjustToMd 3) + + + + /// Functions to create a Item Dto and vice versa. + module Dto = + + module Units = ValueUnit.Units + module Id = WrappedString.Id + module Name = WrappedString.Name + module Quantity = OrderVariable.Quantity + module Concentration = OrderVariable.Concentration + + + type Dto () = + member val Name = "" with get, set + member val ComponentQuantity = OrderVariable.Dto.dto () with get, set + member val OrderableQuantity = OrderVariable.Dto.dto () with get, set + member val ComponentConcentration = OrderVariable.Dto.dto () with get, set + member val OrderableConcentration = OrderVariable.Dto.dto () with get, set + member val Dose = Dose.Dto.dto () with get, set + + + let fromDto (dto: Dto) = + let n = dto.Name |> Name.fromString + let cmp_qty = dto.ComponentQuantity |> Quantity.fromDto + let orb_qty = dto.OrderableQuantity |> Quantity.fromDto + let cmp_cnc = dto.ComponentConcentration |> Concentration.fromDto + let orb_cnc = dto.OrderableConcentration |> Concentration.fromDto + let dos = dto.Dose |> Dose.Dto.fromDto + + create n cmp_qty orb_qty cmp_cnc orb_cnc dos + + + let toDto (itm : Item) = + let dto = Dto () + + dto.Name <- itm.Name |> Name.toString + dto.ComponentQuantity <- + itm.ComponentQuantity + |> Quantity.toDto + dto.OrderableQuantity <- + itm.OrderableQuantity + |> Quantity.toDto + dto.ComponentConcentration <- + itm.ComponentConcentration + |> Concentration.toDto + dto.OrderableConcentration <- + itm.OrderableConcentration + |> Concentration.toDto + dto.Dose <- + itm.Dose |> Dose.Dto.toDto + + dto + + + /// + /// Create a new Item Dto + /// + /// The Id of the Item + /// The name of the Orderable + /// The name of the Component + /// The name of the Item + let dto id orbN cmpN itmN = + createNew id orbN cmpN itmN + |> toDto + + + + + + + /// Types and functions to model a + /// `Component` in an `Orderable`. + /// A `Component` contains a list + /// of `Item`s + [] + module Component = + + + module Name = Name + module Quantity = OrderVariable.Quantity + module Concentration = OrderVariable.Concentration + module Count = OrderVariable.Count + + + /// + /// Create a `Component` with + /// + /// The Id of the Component + /// The name of the Component + /// The shape of the Component + /// The quantity of the Component + /// The quantity of the Component in the Orderable + /// The count of the Component in the Orderable + /// The quantity of the Component in the Order + /// The count of the Component in the Order + /// The concentration of the Component in the Orderable + /// The dose of the Component + /// The list of Items in the Component + let create + id + nm + sh + cmp_qty + orb_qty + orb_cnt + ord_qty + ord_cnt + orb_cnc + dos + ii = + { + Id = id + Name = nm + Shape = sh + ComponentQuantity = cmp_qty + OrderableQuantity = orb_qty + OrderableCount = orb_cnt + OrderQuantity = ord_qty + OrderCount = ord_cnt + OrderableConcentration = orb_cnc + Dose = dos + Items = ii + } + + + /// + /// Create a new `Component` with + /// + /// The Id of the Component + /// The name of the Orderable + /// The name of the Component + /// The shape of the Component + let createNew id orbN cmpN sh = + let un = Unit.NoUnit + let nm = [ id; orbN; cmpN ] |> Name.create + let id = Id.create id + + let cmp_qty = let n = nm |> Name.add Literals.comp in Quantity.create n un + let orb_qty = let n = nm |> Name.add Literals.orderable in Quantity.create n un + let orb_cnt = let n = nm |> Name.add Literals.orderable in Count.create n + let ord_qty = let n = nm |> Name.add Literals.order in Quantity.create n un + let ord_cnt = let n = nm |> Name.add Literals.order in Count.create n + let orb_cnc = let n = nm |> Name.add Literals.orderable in Concentration.create n un un + let dos = Dose.createNew nm + + create id (cmpN |> Name.fromString) sh cmp_qty orb_qty orb_cnt ord_qty ord_cnt orb_cnc dos [] + + + /// Apply **f** to a `Component` **comp** + let apply f (comp: Component) = comp |> f + + + /// Utility to facilitate type inference + let get = apply id + + + /// Get the name of a `Component` + let getName cmp = (cmp |> get).Name + + + /// Get the `Item`s in an `Component` + let getItems cmp = (cmp |> get).Items + + + /// + /// Return a Component as a list of OrderVariables + /// + /// The Component + let toOrdVars cmp = + let cmp_qty = (cmp |> get).ComponentQuantity |> Quantity.toOrdVar + let orb_qty = cmp.OrderableQuantity |> Quantity.toOrdVar + let orb_cnt = cmp.OrderableCount |> Count.toOrdVar + let orb_cnc = cmp.OrderableConcentration |> Concentration.toOrdVar + let ord_qty = cmp.OrderQuantity |> Quantity.toOrdVar + let ord_cnt = cmp.OrderCount |> Count.toOrdVar + + [ + cmp_qty + orb_qty + orb_cnt + orb_cnc + ord_qty + ord_cnt + yield! cmp.Dose |> Dose.toOrdVars + yield! cmp.Items |> List.collect Item.toOrdVars + ] + + + + /// + /// Create a new Component from a list of OrderVariables using + /// an old Component. + /// + /// The list of OrderVariables + /// The old Component + let fromOrdVars ovars cmp = + let cmp_qty = (cmp |> get).ComponentQuantity |> Quantity.fromOrdVar ovars + let orb_qty = cmp.OrderableQuantity |> Quantity.fromOrdVar ovars + let orb_cnt = cmp.OrderableCount |> Count.fromOrdVar ovars + let orb_cnc = cmp.OrderableConcentration |> Concentration.fromOrdVar ovars + let ord_qty = cmp.OrderQuantity |> Quantity.fromOrdVar ovars + let ord_cnt = cmp.OrderCount |> Count.fromOrdVar ovars + let dos = cmp.Dose |> Dose.fromOrdVars ovars + + cmp.Items + |> List.map (Item.fromOrdVars ovars) + |> create cmp.Id cmp.Name cmp.Shape cmp_qty orb_qty orb_cnt ord_qty ord_cnt orb_cnc dos + + + /// + /// Apply constraints to a Component + /// + /// The Component + let applyConstraints cmp = + let cmp_qty = (cmp |> get).ComponentQuantity |> Quantity.applyConstraints + let orb_qty = cmp.OrderableQuantity |> Quantity.applyConstraints + let orb_cnt = cmp.OrderableCount |> Count.applyConstraints + let orb_cnc = cmp.OrderableConcentration |> Concentration.applyConstraints + let ord_qty = cmp.OrderQuantity |> Quantity.applyConstraints + let ord_cnt = cmp.OrderCount |> Count.applyConstraints + let dos = cmp.Dose |> Dose.applyConstraints + + cmp.Items + |> List.map Item.applyConstraints + |> create cmp.Id cmp.Name cmp.Shape cmp_qty orb_qty orb_cnt ord_qty ord_cnt orb_cnc dos + + + + /// + /// Increase the increment of a Component to a maximum + /// count using a list of increments. + /// + /// The maximum count + /// The list of increments + /// The Component + let increaseIncrement maxCount incrs cmp = + let cmp_qty = (cmp |> get).ComponentQuantity + let orb_qty = cmp.OrderableQuantity |> Quantity.increaseIncrement maxCount incrs + let orb_cnt = cmp.OrderableCount + let orb_cnc = cmp.OrderableConcentration + let ord_qty = cmp.OrderQuantity + let ord_cnt = cmp.OrderCount + let dos = cmp.Dose + + cmp.Items + |> create cmp.Id cmp.Name cmp.Shape cmp_qty orb_qty orb_cnt ord_qty ord_cnt orb_cnc dos + + + let setDoseUnit sn du cmp = + { cmp with + Items = cmp.Items |> List.map (Item.setDoseUnit sn du) + } + + + /// + /// Create a string list from a Component where each string is + /// a variable name with the value range and the Unit + /// + let toString = toOrdVars >> List.map (OrderVariable.toString false) + + + + module Print = + + + let quantityTo get toStr (c : Component) = + c + |> get + |> toStr + + + let componentQuantityToString = + quantityTo + (_.ComponentQuantity) + (Quantity.toValueUnitString -1) + + + let componentQuantityToMd = + quantityTo + (_.ComponentQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let componentOrderableQuantityToString = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitString -1) + + + let componentOrderableQuantityToMd = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let componentOrderQuantityToString prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitString prec) + + + let componentOrderQuantityToMd prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitMarkdown prec) + + + let countTo get toStr (c : Component) = + c + |> get + |> toStr + + + let componentOrderableCountToString prec = + countTo + (_.OrderableCount) + (Count.toValueUnitString prec) + + + let componentOrderableCountToMd prec = + countTo + (_.OrderableCount) + (Count.toValueUnitMarkdown prec) + + + let componentOrderCountToString prec = + countTo + (_.OrderCount) + (Count.toValueUnitString prec) + + + let componentOrderCountToMd prec = + countTo + (_.OrderCount) + (Count.toValueUnitMarkdown prec) + + + let componentOrderableConcentrationTo toStr (c : Component) = + c.OrderableConcentration + |> toStr + + + let componentOrderableConcentrationToString prec = + componentOrderableConcentrationTo (Concentration.toValueUnitString prec) + + + let componentOrderableConcentrationToMd prec = + componentOrderableConcentrationTo (Concentration.toValueUnitMarkdown prec) + + + let doseTo toStr (c : Component) = + c.Dose + |> toStr + + + let componentDoseQuantityToString = + doseTo (Dose.Print.doseQuantityToString -1) + + + let componentDoseQuantityToMd = + doseTo (Dose.Print.doseQuantityToMd -1) + + + let componentDoseQuantityAdjustToString prec = + doseTo (Dose.Print.doseQuantityAdjustToString prec) + + + let componentDoseQuantityAdjustToMd prec = + doseTo (Dose.Print.doseQuantityAdjustToMd prec) + + + let componentDosePerTimeToString prec = + doseTo (Dose.Print.dosePerTimeToString prec) + + + let componentDosePerTimeToMd prec = + doseTo (Dose.Print.dosePerTimeToMd prec) + + + let componentDosePerTimeAdjustToString prec = + doseTo (Dose.Print.dosePerTimeAdjustToString prec) + + + let componentDosePerTimeAdjustToMd prec = + doseTo (Dose.Print.dosePerTimeAdjustToMd prec) + + + let componentDoseRateToString prec = + doseTo (Dose.Print.doseRateToString prec) + + + let componentDoseRateToMd prec = + doseTo (Dose.Print.doseRateToMd prec) + + + let componentDoseRateAdjustToString prec = + doseTo (Dose.Print.doseRateAdjustToString prec) + + + let componentDoseRateAdjustToMd prec = + doseTo (Dose.Print.doseRateAdjustToMd prec) + + + + /// Helper functions for the Component Dto + module Dto = + + module Units = ValueUnit.Units + module Id = WrappedString.Id + module Name = WrappedString.Name + module Quantity = OrderVariable.Quantity + module Concentration = OrderVariable.Concentration + module CT = OrderVariable.Count + + + type Dto () = + member val Id = "" with get, set + member val Name = "" with get, set + member val Shape = "" with get, set + member val ComponentQuantity = OrderVariable.Dto.dto () with get, set + member val OrderableQuantity = OrderVariable.Dto.dto () with get, set + member val OrderableCount = OrderVariable.Dto.dto () with get, set + member val OrderQuantity = OrderVariable.Dto.dto () with get, set + member val OrderCount = OrderVariable.Dto.dto () with get, set + member val OrderableConcentration = OrderVariable.Dto.dto () with get, set + member val Dose = Dose.Dto.dto () with get, set + member val Items : Item.Dto.Dto list = [] with get, set + + + let fromDto (dto: Dto) = + + let id = dto.Id |> Id.create + let n = dto.Name |> Name.fromString + let s = dto.Shape + let cmp_qty = dto.ComponentQuantity |> Quantity.fromDto + let orb_qty = dto.OrderableQuantity |> Quantity.fromDto + let orb_cnt = dto.OrderableCount |> Count.fromDto + let orb_cnc = dto.OrderableConcentration |> Concentration.fromDto + let ord_qty = dto.OrderQuantity |> Quantity.fromDto + let ord_cnt = dto.OrderCount |> Count.fromDto + let ii = + dto.Items + |> List.map Item.Dto.fromDto + + let dos = dto.Dose |> Dose.Dto.fromDto + + create id n s cmp_qty orb_qty orb_cnt ord_qty ord_cnt orb_cnc dos ii + + + let toDto (cmp : Component) = + let dto = Dto () + + dto.Name <- cmp.Name |> Name.toString + dto.Shape <- cmp.Shape + dto.ComponentQuantity <- + cmp.ComponentQuantity + |> Quantity.toDto + dto.OrderableQuantity <- + cmp.OrderableQuantity + |> Quantity.toDto + dto.OrderableCount <- + cmp.OrderableCount + |> Count.toDto + dto.OrderQuantity <- + cmp.OrderQuantity + |> Quantity.toDto + dto.OrderCount <- + cmp.OrderCount + |> Count.toDto + dto.OrderableConcentration <- + cmp.OrderableConcentration + |> Concentration.toDto + dto.Dose <- + cmp.Dose + |> Dose.Dto.toDto + dto.Items <- + cmp.Items + |> List.map Item.Dto.toDto + + dto + + + /// + /// Create a Component Dto + /// + /// The Id of the Component + /// The name of the Orderable + /// The name of the Component + /// The shape of the Component + let dto id orbN cmpN shape = + createNew id orbN cmpN shape + |> toDto + + + + + module Quantity = OrderVariable.Quantity + module Concentration = OrderVariable.Concentration + module Count = OrderVariable.Count + + + /// + /// Create an `Orderable` with + /// + /// The name of the Orderable + /// The quantity of the Orderable + /// The quantity of the Orderable in the Order + /// The count of the Orderable in the Order + /// The count of the Orderable dose in the Order + /// The dose of the Orderable + /// The list of Components in the Orderable + let create + n + orb_qty + ord_qty + ord_cnt + dos_cnt + dos + cc = + { + Name = n + OrderableQuantity = orb_qty + OrderQuantity = ord_qty + OrderCount = ord_cnt + DoseCount = dos_cnt + Dose = dos + Components = cc + } + + + /// + /// Create a new `Orderable` with + /// + /// The Id of the Orderable + /// The name of the Orderable + let createNew id orbN = + let un = Unit.NoUnit + let n = [id; orbN] |> Name.create + + let orb_qty = let n = n |> Name.add Literals.orderable in Quantity.create n un + let ord_qty = let n = n |> Name.add Literals.order in Quantity.create n un + let ord_cnt = let n = n |> Name.add Literals.order in Count.create n + let dos_cnt = let n = n |> Name.add Literals.dose in Count.create n + let dos = Dose.createNew n + + create (orbN |> Name.fromString) orb_qty ord_qty ord_cnt dos_cnt dos [] + + + /// Apply **f** to `Orderable` `ord` + let apply f (orb: Orderable) = orb |> f + + + /// Utility function to facilitate type inference + let get = apply id + + + /// Get the name of the `Orderable` + let getName orb = (orb |> get).Name + + + /// Get the Components in an `Orderable` + let getComponents orb = (orb |> get).Components + + + /// Get the `Orderable` dose + let getDose orb = (orb |> get).Dose + + + + /// + /// Return an Orderable as a list of OrderVariables + /// + /// The Orderable + let toOrdVars orb = + let ord_qty = (orb |> get).OrderQuantity |> Quantity.toOrdVar + let orb_qty = orb.OrderableQuantity |> Quantity.toOrdVar + let ord_cnt = orb.OrderCount |> Count.toOrdVar + let dos_cnt = orb.DoseCount |> Count.toOrdVar + + [ + ord_qty + orb_qty + ord_cnt + dos_cnt + yield! orb.Dose |> Dose.toOrdVars + yield! orb.Components |> List.collect Component.toOrdVars + ] + + + + /// + /// Create a new Orderable from a list of OrderVariables using + /// an old Orderable. + /// + /// The list of OrderVariables + /// The old Orderable + /// The new Orderable + let fromOrdVars ovars orb = + let ord_qty = (orb |> get).OrderQuantity |> Quantity.fromOrdVar ovars + let orb_qty = orb.OrderableQuantity |> Quantity.fromOrdVar ovars + let ord_cnt = orb.OrderCount |> Count.fromOrdVar ovars + let dos_cnt = orb.DoseCount |> Count.fromOrdVar ovars + let dos = orb.Dose |> Dose.fromOrdVars ovars + + orb.Components + |> List.map (Component.fromOrdVars ovars) + |> create orb.Name orb_qty ord_qty ord_cnt dos_cnt dos + + + /// + /// Apply constraints to an Orderable + /// + /// The Orderable + let applyConstraints orb = + let ord_qty = (orb |> get).OrderQuantity |> Quantity.applyConstraints + let orb_qty = orb.OrderableQuantity |> Quantity.applyConstraints + let ord_cnt = orb.OrderCount |> Count.applyConstraints + let dos_cnt = orb.DoseCount |> Count.applyConstraints + let dos = orb.Dose |> Dose.applyConstraints + + orb.Components + |> List.map Component.applyConstraints + |> create orb.Name orb_qty ord_qty ord_cnt dos_cnt dos + + + /// + /// Return a list of strings from an Orderable where each string is + /// a variable name with the value range and the Unit + /// + let toString = toOrdVars >> List.map (OrderVariable.toString false) + + + /// + /// Increase the Quantity increment of an Orderable to a maximum + /// count using a list of increments. + /// + /// The maximum count + /// The list of increments + /// The Orderable + let increaseQuantityIncrement maxCount incrs orb = + // check if all relevant OrderVariables have an increment + if + [ + orb.OrderableQuantity + yield! + orb.Components + |> List.map _.OrderableQuantity + ] + |> List.forall Quantity.hasIncrement + |> not + then orb + else + // first calculate the minimum increment increase for the orderable and components + let ord_qty = (orb |> get).OrderQuantity + let orb_qty = orb.OrderableQuantity |> Quantity.increaseIncrement maxCount incrs + let ord_cnt = orb.OrderCount + let dos_cnt = orb.DoseCount + let dos = orb.Dose //|> Dose.increaseIncrement incr + + orb.Components + |> List.map (Component.increaseIncrement maxCount incrs) + |> create orb.Name orb_qty ord_qty ord_cnt dos_cnt dos + + |> fun newOrb -> + [ + (newOrb.OrderableQuantity |> Quantity.toOrdVar |> OrderVariable.getVar).Values + yield! newOrb.Components + |> List.map (fun c -> + (c.OrderableQuantity |> Quantity.toOrdVar |> OrderVariable.getVar).Values + ) + ] + |> List.choose Variable.ValueRange.getIncr + |> function + | [] -> orb + | incrs -> + if incrs |> List.length <> ((orb.Components |> List.length) + 1) then orb + else + let incr = + incrs + |> List.minBy (fun i -> + i + |> Variable.ValueRange.Increment.toValueUnit + |> ValueUnit.getBaseValue + ) + + // apply the minimum increment increase to the orderable and components + let ord_qty = (orb |> get).OrderQuantity + let orb_qty = orb.OrderableQuantity |> Quantity.increaseIncrement maxCount [incr] + let ord_cnt = orb.OrderCount + let dos_cnt = orb.DoseCount + let dos = orb.Dose //|> Dose.increaseIncrement incr + + orb.Components + |> List.map (Component.increaseIncrement maxCount [incr]) + |> create orb.Name orb_qty ord_qty ord_cnt dos_cnt dos + + + /// + /// Increase the Rate increment of an Orderable to a maximum + /// count using a list of increments. + /// + /// The maximum count + /// The list of increments + /// The Orderable + let increaseRateIncrement maxCount incrs orb = + let ord_qty = (orb |> get).OrderQuantity + let orb_qty = orb.OrderableQuantity //|> Quantity.increaseIncrement incr + let ord_cnt = orb.OrderCount + let dos_cnt = orb.DoseCount + let dos = orb.Dose |> Dose.increaseIncrement maxCount incrs + + orb.Components + |> create orb.Name orb_qty ord_qty ord_cnt dos_cnt dos + + + let setDoseUnit sn du orb = + { orb with + Components = orb.Components |> List.map (Component.setDoseUnit sn du) + } + + + module Print = + + + let quantityTo get toStr (o : Orderable) = + o + |> get + |> toStr + + + let orderableQuantityToString = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitString -1) + + + let orderableQuantityToMd = + quantityTo + (_.OrderableQuantity) + (Quantity.toValueUnitMarkdown -1) + + + let orderQuantityToString prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitString prec) + + + let orderQuantityToMd prec = + quantityTo + (_.OrderQuantity) + (Quantity.toValueUnitMarkdown prec) + + + let countTo get toStr (o : Orderable) = + o + |> get + |> toStr + + + let orderCountToString prec = + countTo + (_.OrderCount) + (Count.toValueUnitString prec) + + + let orderCountToMd prec = + countTo + (_.OrderCount) + (Count.toValueUnitMarkdown prec) + + + let doseTo toStr (o : Orderable) = + o.Dose + |> toStr + + + let doseQuantityToString = + doseTo (Dose.Print.doseQuantityToString -1) + + + let doseQuantityToMd = + doseTo (Dose.Print.doseQuantityToMd -1) + + + let doseQuantityAdjustToString prec = + doseTo (Dose.Print.doseQuantityAdjustToString prec) + + + let doseQuantityAdjustToMd prec = + doseTo (Dose.Print.doseQuantityAdjustToMd prec) + + + let dosePerTimeToString prec = + doseTo (Dose.Print.dosePerTimeToString prec) + + + let dosePerTimeToMd prec = + doseTo (Dose.Print.dosePerTimeToMd prec) + + + let dosePerTimeAdjustToString prec = + doseTo (Dose.Print.dosePerTimeAdjustToString prec) + + + let dosePerTimeAdjustToMd prec = + doseTo (Dose.Print.dosePerTimeAdjustToMd prec) + + + let doseRateToString = + doseTo (Dose.Print.doseRateToString -1) + + + let doseRateToMd = + doseTo (Dose.Print.doseRateToMd -1) + + + let doseRateAdjustToString prec = + doseTo (Dose.Print.doseRateAdjustToString prec) + + + let doseRateAdjustToMd prec = + doseTo (Dose.Print.doseRateAdjustToMd prec) + + + + /// Helper functions for the Orderable Dto + module Dto = + + module Units = ValueUnit.Units + module Id = WrappedString.Id + module Name = WrappedString.Name + module Quantity = OrderVariable.Quantity + module Concentration = OrderVariable.Concentration + module CT = OrderVariable.Count + + + type Dto () = + member val Name = "" with get, set + member val OrderableQuantity = OrderVariable.Dto.dto () with get, set + member val OrderQuantity = OrderVariable.Dto.dto () with get, set + member val OrderCount = OrderVariable.Dto.dto () with get, set + member val DoseCount = OrderVariable.Dto.dto () with get, set + member val Dose = Dose.Dto.dto () with get, set + member val Components : Component.Dto.Dto list = [] with get, set + + + let fromDto (dto: Dto) = + let n = dto.Name |> Name.fromString + + let orb_qty = dto.OrderableQuantity |> Quantity.fromDto + let ord_qty = dto.OrderQuantity |> Quantity.fromDto + let ord_cnt = dto.OrderCount |> Count.fromDto + let dos_cnt = dto.DoseCount |> Count.fromDto + + let cc = + dto.Components + |> List.map Component.Dto.fromDto + + let dos = dto.Dose |> Dose.Dto.fromDto + + create n orb_qty ord_qty ord_cnt dos_cnt dos cc + + + let toDto (orb : Orderable) = + let dto = Dto () + + dto.Name <- orb.Name |> Name.toString + dto.OrderableQuantity <- + orb.OrderableQuantity + |> Quantity.toDto + dto.OrderQuantity <- + orb.OrderQuantity + |> Quantity.toDto + dto.OrderCount <- + orb.OrderCount + |> Count.toDto + dto.DoseCount <- + orb.DoseCount + |> Count.toDto + dto.Dose <- + orb.Dose + |> Dose.Dto.toDto + dto.Components <- + orb.Components + |> List.map Component.Dto.toDto + + dto + + + /// + /// Create a new Orderable Dto + /// + /// The Id of the Orderable + /// The name of the Orderable + let dto id orbN = + createNew id orbN + |> toDto + + + [] + module Prescription = + + + module Frequency = OrderVariable.Frequency + module Time = OrderVariable.Time + + + /// + /// Create a Frequency and Time + /// + /// The frequency time unit + /// The time unit + /// The name of the Frequency and Time + let freqTime tu1 tu2 n = (Frequency.create n tu1, Time.create n tu2) + + + /// Create a Once `Prescription` + let once tu1 tu2 n = + let _, _ = n |> freqTime tu1 tu2 in Once + + + /// Create a OnceTimed `Prescription` + let onceTimed tu1 tu2 n = + let _, tme = n |> freqTime tu1 tu2 in tme |> OnceTimed + + + /// Create a Continuous `Prescription` + let continuous tu1 tu2 n = + let _, _ = n |> freqTime tu1 tu2 in Continuous + + + /// Create a Discontinuous `Prescription` + let discontinuous tu1 tu2 n = + let frq, _ = n |> freqTime tu1 tu2 in frq |> Discontinuous + + + /// Create a Timed `Prescription` + let timed tu1 tu2 n = + let frq, tme = n |> freqTime tu1 tu2 in (frq, tme) |> Timed + + + /// Check whether a `Prescription` is Continuous + let isContinuous = function | Continuous -> true | _ -> false + + + /// Check whether a `Prescription` is Timed + let isTimed = function | Timed _ -> true | _ -> false + + + /// + /// Return a Prescription as a Frequency OrderVariable option + /// and a Time OrderVariable option + /// + /// The Prescription + let toOrdVars prs = + match prs with + | Once + | Continuous -> None, None + | OnceTimed tme -> + None, tme |> Time.toOrdVar |> Some + | Discontinuous frq -> + frq |> Frequency.toOrdVar |> Some, None + | Timed(frq, tme) -> + frq |> Frequency.toOrdVar |> Some, tme |> Time.toOrdVar |> Some + + + /// + /// Create a new Prescription from a list of OrderVariables using + /// an old Prescription. + /// + /// The list of OrderVariables + /// The old Prescription + let fromOrdVars ovars prs = + match prs with + | Once + | Continuous -> prs + | OnceTimed tme -> + tme |> Time.fromOrdVar ovars |> OnceTimed + | Discontinuous frq -> + frq |> Frequency.fromOrdVar ovars |> Discontinuous + | Timed(frq, tme) -> + (frq |> Frequency.fromOrdVar ovars, + tme |> Time.fromOrdVar ovars) + |> Timed + + + /// + /// Apply constraints to a Prescription + /// + let applyConstraints prs = + match prs with + | Once + | Continuous -> prs + | OnceTimed tme -> + tme |> Time.applyConstraints |> OnceTimed + | Discontinuous frq -> + frq |> Frequency.applyConstraints |> Discontinuous + | Timed(frq, tme) -> + (frq |> Frequency.applyConstraints, + tme |> Time.applyConstraints) + |> Timed + + + let setDoseUnit sn du ord = + { ord with + Orderable = ord.Orderable |> Orderable.setDoseUnit sn du + } + + + /// + /// Return a list of strings from a Prescription where each string is + /// a variable name with the value range and the Unit + /// + let toString (prs: Prescription) = + match prs with + | Once -> ["eenmalig"] + | Continuous -> ["continu"] + | OnceTimed tme -> [tme |> Time.toString] + | Discontinuous frq -> [frq |> Frequency.toString] + | Timed(frq, tme) -> [frq |> Frequency.toString; tme |> Time.toString] + + + + module Print = + + + let frequencyTo toStr (p : Prescription) = + match p with + | Discontinuous frq -> frq |> toStr + | _ -> "" + + + let frequencyToString = + frequencyTo (Frequency.toValueUnitString -1) + + + let frequencyToMd = + frequencyTo (Frequency.toValueUnitMarkdown -1) + + + let timeTo toStr (p : Prescription) = + match p with + | OnceTimed tme -> tme |> toStr + | Timed (_, tme) -> tme |> toStr + | _ -> "" + + + let timeToString prec = + timeTo (Time.toValueUnitString prec) + + + let timeToMd prec = + timeTo (Time.toValueUnitMarkdown prec) + + + let prescriptionToString (p : Prescription) = + match p with + | Once -> "eenmalig" + | Continuous -> "continu" + | OnceTimed _ -> p |> timeToMd -1 + | Discontinuous _ -> p |> frequencyToString + | Timed _ -> $"{p |> frequencyToString} {p |> timeToString -1}" + + + let prescriptionToMd (p : Prescription) = + match p with + | Once -> "eenmalig" + | Continuous -> "continu" + | OnceTimed _ -> p |> timeToMd -1 + | Discontinuous _ -> p |> frequencyToMd + | Timed _ -> $"{p |> frequencyToMd} {p |> timeToMd -1}" + + + + /// Helper functions for the Prescription Dto + module Dto = + + + module Units = ValueUnit.Units + module Id = WrappedString.Id + module NM = Name + + + type Dto () = + member val IsOnce = false with get, set + member val IsOnceTimed = false with get, set + member val IsContinuous = false with get, set + member val IsDiscontinuous = false with get, set + member val IsTimed = false with get, set + member val Frequency = OrderVariable.Dto.dto () with get, set + member val Time = OrderVariable.Dto.dto () with get, set + + + let fromDto (dto : Dto) = + match dto.IsOnce, + dto.IsOnceTimed, + dto.IsContinuous, + dto.IsDiscontinuous, + dto.IsTimed with + | false, false, true, false, false -> Continuous + | false, false, false, true, false -> + dto.Frequency + |> Frequency.fromDto + |> Discontinuous + | false, false, false, false, true -> + (dto.Frequency |> Frequency.fromDto, dto.Time |> Time.fromDto) + |> Timed + | true, false, false, false, false -> Once + | false, true, false, false, false -> + dto.Time + |> Time.fromDto + |> OnceTimed + | _ -> exn "dto is neither or both process, continuous, discontinuous or timed" + |> raise + + + let toDto pres = + let dto = Dto () + + match pres with + | Once -> dto.IsOnce <- true + | Continuous -> dto.IsContinuous <- true + | OnceTimed time -> + dto.IsOnceTimed <- true + dto.Time <- time |> Time.toDto + | Discontinuous freq -> + dto.IsDiscontinuous <- true + dto.Frequency <- freq |> Frequency.toDto + | Timed (freq, time) -> + dto.IsTimed <- true + dto.Frequency <- freq |> Frequency.toDto + dto.Time <- time |> Time.toDto + + dto + + + /// + /// Create a Prescription Dto + /// + /// The name of the Prescription + /// + /// Defaults to a Discontinuous Prescription + /// + let dto n = + let dto = Dto () + let f, t = + n + |> Name.fromString + |> freqTime Unit.NoUnit Unit.NoUnit + + dto.Frequency <- f |> Frequency.toDto + dto.Time <- t |> Time.toDto + dto.IsDiscontinuous <- true + + dto + + + /// Make the Prescription Dto Once + let setToOnce (dto : Dto) = + dto.IsOnce <- true + dto.IsOnceTimed <- false + dto.IsContinuous <- false + dto.IsDiscontinuous <- false + dto.IsTimed <- false + + dto + + + /// Make the Prescription Dto OnceTimed + let setToOnceTimed (dto : Dto) = + dto.IsOnce <- false + dto.IsOnceTimed <- true + dto.IsContinuous <- false + dto.IsDiscontinuous <- false + dto.IsTimed <- false + + dto + + + /// Make the Prescription Dto Continuous + let setToContinuous (dto : Dto) = + dto.IsOnce <- false + dto.IsOnceTimed <- false + dto.IsContinuous <- true + dto.IsDiscontinuous <- false + dto.IsTimed <- false + + dto + + + /// Make the Prescription Dto Discontinuous + let setToDiscontinuous (dto : Dto) = + dto.IsOnce <- false + dto.IsOnceTimed <- false + dto.IsContinuous <- false + dto.IsDiscontinuous <- true + dto.IsTimed <- false + + dto + + + /// Make the Prescription Dto Timed + let setToTimed (dto : Dto) = + dto.IsOnce <- false + dto.IsOnceTimed <- false + dto.IsContinuous <- false + dto.IsDiscontinuous <- false + dto.IsTimed <- true + + dto + + + + /// Types and functions that + /// model a start and stop date time + /// of an `Order` + [] + module StartStop = + + + /// Get the string representation of a `StartStop` + let toString startStop = + match startStop with + | Start dt -> + dt + |> DateTime.formattedString "dd-MM-yy" + |> sprintf "%s" + | StartStop (start, stop) -> + stop + |> DateTime.formattedString "dd-MM-yy" + |> sprintf "%s - %s" (start |> DateTime.formattedString "dd-MM-yy") + + + [] + module OrderType = + + let toString = function + | AnyOrder -> $"{AnyOrder}" + | OnceOrder -> $"{OnceOrder}" + | OnceTimedOrder -> $"{OnceTimedOrder}" + | ProcessOrder -> $"{ProcessOrder}" + | ContinuousOrder -> $"{ContinuousOrder}" + | DiscontinuousOrder -> $"{DiscontinuousOrder}" + | TimedOrder -> $"{TimedOrder}" + + let map s = + match s with + | _ when s = "eenmalig" -> OnceOrder + | _ when s = "eenmalig inlooptijd" -> OnceTimedOrder + | _ when s = "discontinu" -> DiscontinuousOrder + | _ when s = "continu" -> ContinuousOrder + | _ when s = "inlooptijd" -> TimedOrder + | _ -> DiscontinuousOrder + + + open MathNet.Numerics + + module Variable = Informedica.GenSolver.Lib.Variable + module ValueRange = Variable.ValueRange + module Equation = Informedica.GenSolver.Lib.Equation + module Property = ValueRange.Property + module Quantity = OrderVariable.Quantity + module QuantityAdjust = OrderVariable.QuantityAdjust + module Frequency = OrderVariable.Frequency + module PerTime = OrderVariable.PerTime + module PerTimeAdjust = OrderVariable.PerTimeAdjust + module Concentration = OrderVariable.Concentration + module Rate = OrderVariable.Rate + module RateAdjust = OrderVariable.RateAdjust + module Time = OrderVariable.Time + module Units = ValueUnit.Units + module Dose = Orderable.Dose + + + type Equation = Informedica.GenSolver.Lib.Types.Equation + + + /// Apply `f` to `Order` `ord` + let apply f (ord: Order) = ord |> f + + + /// Utility function to facilitate type inference + let get = apply id + + + /// Get the order id + let getId ord = (ord |> get).Id + + + /// + /// Create an `Order` with + /// + /// The id of the Order + /// The adjust quantity of the Order + /// The Orderable of the Order + /// The Prescription of the Order + /// The Route of the Order + /// The Time of the Order + /// The StartStop of the Order + let create id adj_qty orb prs rte tme sts = + { + Id = id + Adjust = adj_qty + Orderable = orb + Prescription = prs + Route = rte + Duration = tme + StartStop = sts + } + + + /// + /// Create a new `Order` with + /// + /// The id of the Order + /// The name of the Orderable + /// A function to create a Prescription with a Name + /// The Route of the Order + let createNew id orbN str_prs route = + let orb = Orderable.createNew id orbN + let n = [id] |> Name.create + + let adj = + Quantity.create (n |> Name.add Mapping.adj) Unit.NoUnit + + let tme = + Time.create (n |> Name.add Mapping.ord) Unit.NoUnit + + let prs = + n + |> Name.add Mapping.prs + |> str_prs + + let sts = DateTime.Now |> StartStop.Start + + create (id |> Id.create) adj orb prs route tme sts + + + /// Get the Adjust quantity of an `Order` + let getAdjust ord = (ord |> get).Adjust + + + /// Get the Orderable of an `Order` + let getOrderable ord = (ord |> get).Orderable + + + /// + /// Return an Order as a list of strings where each string is + /// a variable name with the value range and the Unit + /// + let toString (ord: Order) = + [ ord.Adjust |> Quantity.toString ] + |> List.append (Orderable.Literals.orderable::(ord.Orderable |> Orderable.toString)) + |> List.append ("Prescription"::(ord.Prescription |> Prescription.toString)) + |> List.append ("Route"::[ord.Route]) + |> List.filter (String.isNullOrWhiteSpace >> not) + + + /// + /// Return an Order as a list of OrderVariables + /// + let toOrdVars (ord : Order) = + let adj_qty = ord.Adjust |> Quantity.toOrdVar + let ord_tme = ord.Duration |> Time.toOrdVar + + let prs_vars = + ord.Prescription + |> Prescription.toOrdVars + |> fun (f, t) -> + [f; t] + |> List.choose id + [ + adj_qty + ord_tme + yield! prs_vars + yield! ord.Orderable |> Orderable.toOrdVars + ] + + + /// + /// Create a new Order from a list of OrderVariables using + /// an old Order. + /// + /// The list of OrderVariables + /// The old Order + let fromOrdVars ovars (ord : Order) = + { ord with + Adjust = ord.Adjust |> Quantity.fromOrdVar ovars + Duration = ord.Duration |> Time.fromOrdVar ovars + Prescription = ord.Prescription |> Prescription.fromOrdVars ovars + Orderable = ord.Orderable |> Orderable.fromOrdVars ovars + } + + + /// + /// Apply constraints to an Order + /// + /// The Order + let applyConstraints (ord : Order) = + try + { ord with + Adjust = ord.Adjust |> Quantity.applyConstraints + Duration = ord.Duration |> Time.applyConstraints + Prescription = ord.Prescription |> Prescription.applyConstraints + Orderable = ord.Orderable |> Orderable.applyConstraints + } + with + | _ -> + let s = ord |> toString |> String.concat "\n" + ConsoleWriter.writeErrorMessage + $"couldn't apply constraints:\n{s}" + true false + reraise() + + + let isSolved (ord: Order) = + let qty = + ord.Orderable.Dose.Quantity + |> Quantity.toOrdVar + |> OrderVariable.isSolved + let rte = + ord.Orderable.Dose.Rate + |> Rate.toOrdVar + |> OrderVariable.isSolved + qty || rte + + + /// + /// Increase the Quantity increment of an Order to a maximum + /// count using a list of increments. + /// + /// The maximum count + /// The list of increments + /// The Order + let increaseQuantityIncrement maxCount incrs (ord : Order) = + { ord with + Orderable = + ord.Orderable + |> Orderable.increaseQuantityIncrement + maxCount + incrs + } + + + /// + /// Increase the Rate increment of an Order to a maximum + /// count using a list of increments. + /// + /// The maximum count + /// The list of increments + /// The Order + let increaseRateIncrement maxCount incrs (ord : Order) = + { ord with + Orderable = + ord.Orderable + |> Orderable.increaseRateIncrement maxCount incrs + } + + + /// + /// Map an Order to a list of Equations using a Product Equation + /// mapping and a Sum Equation mapping + /// + /// The Product Equation mapping and the Sum Equation mapping + /// The Order + /// A list of OrderEquations + let mapToOrderEquations eqMapping (ord: Order) = + let ovars = ord |> toOrdVars + + let map repl eqMapping = + let eqs, c = + match eqMapping with + | SumMapping eqs -> eqs, OrderSumEquation + | ProductMapping eqs -> eqs, OrderProductEquation + eqs + |> List.map (String.replace "=" repl) + |> List.map (String.split repl >> List.map String.trim) + |> List.map (fun xs -> + match xs with + | h::rest -> + let h = + try + ovars |> List.find (fun v -> v.Variable.Name |> Name.toString = h) + with + | _ -> failwith $"cannot find {h} in {ovars}" + let rest = + rest + |> List.map (fun s -> + try + ovars |> List.find (fun v -> v.Variable.Name |> Name.toString = s) + with + | _ -> failwith $"cannot find {s} in {ovars}" + ) + (h, rest) |> c + | _ -> failwith $"cannot map {eqs}" + ) + + let sumEqs, prodEqs = eqMapping + + sumEqs + |> map "+" + |> List.append (prodEqs |> map "*") + + + /// + /// Map a list of OrderEquations to an Order + /// + /// The Order + /// The list of OrderEquations + let mapFromOrderEquations (ord: Order) eqs = + let ovars = + eqs + |> List.collect (fun e -> + match e with + | OrderProductEquation (y, xs) + | OrderSumEquation (y, xs) -> y::xs + ) + |> List.distinct + |> List.map OrderVariable.setUnit + + ord + |> fromOrdVars ovars + + + /// + /// Solve an Order + /// + /// Whether to solve only for the minimum or maximum + /// Whether to print the error + /// The logger + /// The Order + /// A Result with the Order or a list error messages + /// Any exception raised by the solver + let solve minMax printErr logger (ord: Order) = + let ord = + if minMax then ord |> applyConstraints + else ord + + let mapping = + match ord.Prescription with + | Once -> Mapping.once + | Continuous -> Mapping.continuous + | OnceTimed _ -> Mapping.onceTimed + | Discontinuous _ -> Mapping.discontinuous + | Timed _ -> Mapping.timed + |> Mapping.getEquations + |> Mapping.getEqsMapping ord + + let oEqs = + ord + |> mapToOrderEquations mapping + + try + oEqs + |> Solver.mapToSolverEqs + |> fun eqs -> + if minMax then eqs |> Solver.solveMinMax logger + else eqs |> Solver.solve logger + |> function + | Ok eqs -> + eqs + |> Solver.mapToOrderEqs oEqs + |> mapFromOrderEquations ord + |> Ok + | Error (eqs, m) -> + eqs + |> Solver.mapToOrderEqs oEqs + |> mapFromOrderEquations ord + |> fun eqs -> Error (eqs, m) + + with + | e -> + if printErr then + oEqs + |> mapFromOrderEquations ord + |> toString + |> List.iteri (printfn "%i. %s") + + raise e + + + /// + /// Solve an Order for only the minimum and maximum values + /// + /// Whether to print the error + /// The logger + let solveMinMax printErr logger = solve true printErr logger + + + /// + /// Solve an Order for all values + /// + /// Whether to print the error + /// The logger + let solveOrder printErr logger = solve false printErr logger + + + /// + /// Loop through all the OrderVariables in an Order to + /// turn min incr max to values and subsequently solve the Order. + /// + /// The logger + /// The Order + let minIncrMaxToValues logger (ord: Order) = + let rec loop runAgain ord = + if not runAgain then ord + else + let mutable flag = false + let ovars = + ord + |> toOrdVars + |> List.map (fun ovar -> + if flag || + ovar.Constraints.Incr |> Option.isNone || + ovar.Variable.Values |> ValueRange.isMinIncrMax |> not then ovar + else + flag <- true + let n = + match ord.Prescription with + | OnceTimed _ -> 5 + | Once -> 50 + | Continuous -> 100 + | Discontinuous _ -> 50 + | Timed _ -> 5 + + ovar + |> OrderVariable.minIncrMaxToValues n + ) + if not flag then ord + else + ord + |> fromOrdVars ovars + |> solveOrder false logger // could possible restrict to solve variable + |> function + | Ok ord -> loop flag ord + | Error _ -> ord + + loop true ord + + + /// + /// Increase the Orderable Quantity Increment of an Order. + /// This allows speedy calculation by avoiding large amount + /// of possible values. + /// + /// The OrderLogger to use + /// The maximum count of the Orderable Quantity + /// The maximum count of the Rate + /// The Order to increase the increment of + let increaseIncrements logger maxQtyCount maxRateCount (ord : Order) = + if ord.Prescription |> Prescription.isContinuous then ord + else + let orbQty = ord.Orderable.OrderableQuantity |> Quantity.toOrdVar + // the increments used to increase + let incrs u = + [ 1N/20N; 1N/10N; 1N/2N; 1N; 5N; 10N; 20N ] + |> List.map (ValueUnit.singleWithUnit u) + |> List.map ValueRange.Increment.create + // only increase incr for volume units + if orbQty.Variable + |> Variable.getUnit + |> Option.map (ValueUnit.Group.unitToGroup >> ((=) Group.VolumeGroup) >> not) + |> Option.defaultValue false then ord + else + ord + |> increaseQuantityIncrement maxQtyCount (incrs Units.Volume.milliLiter) + + |> increaseRateIncrement + maxRateCount + (incrs (Units.Volume.milliLiter |> Units.per Units.Time.hour)) + |> solveMinMax false logger + |> function + | Error (_, errs) -> + errs + |> List.iter (fun e -> + ConsoleWriter.writeErrorMessage + $"{e}" + true + false + ) + ord // original order + | Ok ord -> + ConsoleWriter.writeInfoMessage + $"""=== solved order with increased increment === {ord |> toString |> String.concat "\n"}""" + true + false + + ord // increased increment order + |> solveOrder false logger + + |> function + | Error (_, errs) -> + errs + |> List.iter (fun e -> + ConsoleWriter.writeErrorMessage + $"{e}" + true + false + ) + ord // increased increment order + | Ok ord -> + let s = ord |> toString |> String.concat "\n" + ConsoleWriter.writeInfoMessage + $"solved order with increased increment and values:\n {s}" + true + false + + ord // calculated order + |> Ok + + + let setDoseUnit sn du ord = + { ord with Orderable = ord.Orderable |> Orderable.setDoseUnit sn du } + + + module Print = + + open Informedica.GenOrder.Lib + + + let itemConcentrationTo toStr (c : Component) = + c.Items + |> Seq.map (fun i -> + i.ComponentConcentration + |> toStr + |> fun s -> + if s |> String.isNullOrWhiteSpace then "" + else + $"%s{s} {i.Name |> Name.toString}" + ) + |> String.concat " + " + + + let itemConcentrationToString = + itemConcentrationTo (Concentration.toValueUnitString -1) + + + let itemConcentrationToMd = + itemConcentrationTo (Concentration.toValueUnitMarkdown -1) + + + let componentQuantityTo toStr itemConcTo (o : Order) = + o.Orderable.Components + |> Seq.map (fun c -> + c.OrderableQuantity + |> toStr + |> fun q -> + let s = + c + |> itemConcTo + |> String.trim + |> fun s -> + if s |> String.isNullOrWhiteSpace then "" + else + $" ({s})" + match q, s with + | _ when q |> String.notEmpty && s |> String.notEmpty + -> $"{q} {c.Shape} {s}" + | _ when s |> String.notEmpty -> $"{c.Shape} {s}" + | _ when q |> String.notEmpty -> $"{q} {c.Shape}" + | _ -> "" + ) + |> Seq.filter String.notEmpty + |> String.concat " + " + + + let componentQuantityToString = + componentQuantityTo + (Quantity.toValueUnitString -1) + itemConcentrationToString + + + let componentQuantityToMd = + componentQuantityTo + (Quantity.toValueUnitMarkdown -1) + itemConcentrationToMd + + + let orderableDoseQuantityTo toStr (o: Order) = + o.Orderable.Dose.Quantity + |> toStr + + + let orderableDoseQuantityToString = + orderableDoseQuantityTo (Quantity.toValueUnitString -1) + + + let orderableDoseQuantityToMd = + orderableDoseQuantityTo (Quantity.toValueUnitMarkdown -1) + + + let inline printItem sn get vuToStr o = + let on = o.Orderable.Name |> Name.toString + + o.Orderable.Components + |> Seq.collect (fun c -> + c.Items + |> Seq.collect (fun i -> + let n = i.Name |> Name.toString + if sn |> Seq.exists ((=) n) then + i + |> get + |> vuToStr + |> fun s -> + if on |> String.startsWith n && + sn |> Seq.length = 1 then seq [ s ] + else + seq [ $"{s} {n}" ] + + else Seq.empty + ) + ) + |> String.concat " + " + + + let printOrderTo + useAdj + printMd + sn (ord : Order) = + + let sn = sn |> Array.filter String.notEmpty + + let printFr fr = + fr + |> (if printMd then (Frequency.toValueUnitMarkdown -1) else (Frequency.toValueUnitString -1)) + |> String.replace "/" " per " + + let printDq () = + let vuToStr = + if printMd then Quantity.toValueUnitMarkdown 3 + else Quantity.toValueUnitString 3 + ord + |> printItem + sn + (_.Dose.Quantity) + vuToStr + + let printDqAdjust isOnce = + if isOnce then + let vuToStr = + if printMd then QuantityAdjust.toValueUnitMarkdown 3 + else QuantityAdjust.toValueUnitString 3 + ord + |> printItem + sn + (_.Dose.QuantityAdjust) + vuToStr + else + let vuToStr = + if printMd then QuantityAdjust.toValueUnitMarkdown 3 + else QuantityAdjust.toValueUnitString 3 + ord + |> printItem + sn + (_.Dose.QuantityAdjust) + vuToStr + // add dose limits to string + |> fun s -> + if ord.Orderable.Components[0].Dose.Quantity |> Quantity.isSolved then + let nv = + ord.Orderable.Components[0].Items + |> List.map (fun i -> + if not useAdj then "" + else + i.Dose.QuantityAdjust + |> QuantityAdjust.toOrdVar + |> fun ovar -> + ovar.Constraints + |> OrderVariable.Constraints.toMinMaxString 3 + ) + |> List.filter (String.isNullOrWhiteSpace >> not) + |> String.concat " + " + |> fun s -> + if s |> String.isNullOrWhiteSpace then s + else + $" ({s})" + $"= {s |> String.trim}{nv}" + else + $"({s |> String.trim})" + + let printDt ord = + if useAdj then + let vuToStr = + if printMd then PerTimeAdjust.toValueUnitMarkdown 3 + else PerTimeAdjust.toValueUnitString 3 + + printItem + sn + (_.Dose.PerTimeAdjust) + vuToStr + ord + else + let vuToStr = + (if printMd then (PerTime.toValueUnitMarkdown 3) else (PerTime.toValueUnitString 3)) + + printItem + sn + (_.Dose.PerTime) + vuToStr + ord + // add dose limits to string + |> fun s -> + if ord.Orderable.Components[0].Dose.Quantity |> Quantity.isSolved then + let nv = + ord.Orderable.Components[0].Items + |> List.map (fun i -> + if not useAdj then "" + else + i.Dose.PerTimeAdjust + |> PerTimeAdjust.toOrdVar + |> fun ovar -> + ovar.Constraints + |> OrderVariable.Constraints.toMinMaxString 3 + ) + |> List.filter (String.isNullOrWhiteSpace >> not) + |> String.concat " + " + |> fun s -> + if s |> String.isNullOrWhiteSpace then s + else + $" ({s})" + if s |> String.isNullOrWhiteSpace then s + else + $"= {s |> String.trim}{nv}" + else + $"({s |> String.trim})" + + let compQtyToStr = + if printMd then componentQuantityToMd + else componentQuantityToString + let orbDoseQtyToStr = + if printMd then orderableDoseQuantityToMd + else orderableDoseQuantityToString + let doseRateToStr = + if printMd then Rate.toValueUnitMarkdown -1 + else Rate.toValueUnitString -1 + let orbQtyToStr = + if printMd then Quantity.toValueUnitMarkdown -1 + else Quantity.toValueUnitString -1 + + match ord.Prescription with + | Once -> + let dq = printDq () + let dqa = printDqAdjust true + + let pres = $"{dq} {dqa}" + let prep = ord |> compQtyToStr + let adm = ord |> orbDoseQtyToStr + + pres |> String.replace "()" "", + prep, + adm + + | Discontinuous fr -> + // frequencies + let fr = fr |> printFr + let dq = printDq () + let dt = printDt ord + + let pres = $"{fr} {dq} {dt}" + let prep = ord |> compQtyToStr + let adm = $"{fr} {ord |> orbDoseQtyToStr}" + + pres |> String.replace "()" "", + prep, + adm + + | Continuous -> + // infusion rate + let rt = + ord.Orderable.Dose.Rate + |> doseRateToStr + + let oq = + ord.Orderable.OrderableQuantity + |> orbQtyToStr + + let it = + ord + |> printItem + sn + (_.OrderableQuantity) + orbQtyToStr + + let dr = + let printItem = + if useAdj then + printItem + sn + (_.Dose.RateAdjust) + ( + if printMd then RateAdjust.toValueUnitMarkdown 3 + else RateAdjust.toValueUnitString 3 + ) + else + printItem + sn + (_.Dose.Rate) + ( + if printMd then Rate.toValueUnitMarkdown 3 + else Rate.toValueUnitString 3 + ) + + ord + |> printItem + |> fun s -> + if ord.Orderable.Dose.Rate |> Rate.isSolved |> not then s + else + let nv = + ord.Orderable.Components[0].Items + |> List.map (fun i -> + if useAdj then + i.Dose.RateAdjust + |> RateAdjust.toOrdVar + |> fun ovar -> + ovar.Constraints + |> OrderVariable.Constraints.toMinMaxString 3 + else + i.Dose.Rate + |> Rate.toOrdVar + |> fun ovar -> + ovar.Constraints + |> OrderVariable.Constraints.toMinMaxString 3 + ) + |> List.filter (String.isNullOrWhiteSpace >> not) + |> String.concat " + " + $"{s} ({nv})" + + let pres = $"""{sn |> String.concat " + "} {dr}""" + let prep = ord |> compQtyToStr + let adm = $"""{sn |> String.concat " + "} {it} in {oq} stand {rt}""" + + pres, prep, adm + + | Timed (fr, tme) -> + // frequencies + let fr = fr |> printFr + let dq = printDq () + let dt = printDt ord + + let tme = + let vuToStr = + if printMd then Time.toValueUnitMarkdown 2 + else Time.toValueUnitString 2 + + tme + |> vuToStr + + // infusion rate + let rt = + ord.Orderable.Dose.Rate + |> doseRateToStr + + let pres = $"{fr} {dq} {dt}" + let prep = ord |> compQtyToStr + let adm = $"{fr} {ord |> orbDoseQtyToStr} in {tme} stand {rt}" + + pres |> String.replace "()" "", + prep, + adm + + + | OnceTimed tme -> + let dq = printDq () + let dqa = printDqAdjust true + + let tme = + let vuToStr = + if printMd then Time.toValueUnitMarkdown 2 + else Time.toValueUnitString 2 + + tme + |> vuToStr + + // infusion rate + let rt = + ord.Orderable.Dose.Rate + |> doseRateToStr + + let pres = $"{dq} {dqa}" + let prep = ord |> compQtyToStr + let adm = $"{ord |> orbDoseQtyToStr} in {tme} stand {rt}" + + pres |> String.replace "()" "", + prep, + adm + + + let printOrderTo2 + useAdj + printMd + sns (ord : Order) = + + let findItem sn = + ord.Orderable.Components + |> List.collect (_.Items) + |> List.exists (fun i -> i.Name |> Name.toString |> String.equalsCapInsens sn) + + let pres = + match ord.Prescription with + | Once -> "" + | Discontinuous _ -> ord.Prescription |> Prescription.Print.frequencyToMd + | _ -> "" + + sns + |> Array.filter String.notEmpty + |> Array.filter findItem + |> function + | [||] -> + [| + pres + ord.Orderable |> Orderable.Print.doseQuantityToMd + if useAdj then + ord.Orderable + |> Orderable.Print.doseQuantityAdjustToMd -1 + |] + , [||] + , [||] + | itms -> + [| + |] + , [||] + , [||] + + + /// + /// Print an Order to a string using an array of strings + /// to pick the Orderable Items to print. + /// + let printOrderToString useAdj = + printOrderTo + useAdj + false + + + /// + /// Print an Order to a markdown string using an array of strings + /// to pick the Orderable Items to print. + /// + let printOrderToMd printAdj = + printOrderTo + printAdj + true + + + + module Dto = + + type Dto (id , n) = + member val Id = id with get, set + member val Adjust = OrderVariable.Dto.dto () with get, set + member val Orderable = Orderable.Dto.dto id n with get, set + member val Prescription = Prescription.Dto.dto n with get, set + member val Route = "" with get, set + member val Duration = OrderVariable.Dto.dto () with get, set + member val Start = DateTime.now () with get, set + member val Stop : DateTime option = None with get, set + + + let fromDto (dto : Dto) = + let id = dto.Id |> Id.create + let adj_qty = dto.Adjust |> Quantity.fromDto + let ord_tme = dto.Duration |> Time.fromDto + let orb = dto.Orderable |> Orderable.Dto.fromDto + let prs = dto.Prescription |> Prescription.Dto.fromDto + let sts = + match dto.Stop with + | Some dt -> (dto.Start, dt) |> StartStop.StartStop + | None -> dto.Start |> StartStop.Start + + create id adj_qty orb prs dto.Route ord_tme sts + + + let toDto (ord : Order) = + let id = ord.Id |> Id.toString + let n = ord.Orderable.Name |> Name.toString + let dto = Dto (id, n) + + dto.Adjust <- ord.Adjust |> Quantity.toDto + dto.Duration <- ord.Duration |> Time.toDto + dto.Orderable <- ord.Orderable |> Orderable.Dto.toDto + dto.Prescription <- ord.Prescription |> Prescription.Dto.toDto + dto.Route <- ord.Route + let start, stop = + match ord.StartStop with + | StartStop.Start dt -> (dt, None) + | StartStop.StartStop(start, stop) -> (start, stop |> Some) + dto.Start <- start + dto.Stop <- stop + + dto + + + /// + /// Create a new Order Dto + /// + /// The id of the Order + /// The name of the Orderable + /// The Route of the Order + /// The Components of the Orderable + /// A function to create a Prescription with a Name + let dto id orbN rte cmps str_prs = + let dto = + createNew id orbN str_prs rte + |> toDto + + dto.Orderable.Components <- + [ + for cmpN, shape, itms in cmps do + let c = Orderable.Component.Dto.dto id orbN cmpN shape + c.Items <- + itms + |> List.map (Orderable.Item.Dto.dto id orbN cmpN) + c + ] + + dto + + + let cleanDose (dto : Dto) = + dto.Duration |> OrderVariable.Dto.clean + + if dto.Prescription.IsDiscontinuous || dto.Prescription.IsTimed then + dto.Prescription.Frequency |> OrderVariable.Dto.clean + if dto.Prescription.IsTimed then + dto.Prescription.Time |> OrderVariable.Dto.clean + if not dto.Prescription.IsContinuous then + dto.Orderable.OrderableQuantity |> OrderVariable.Dto.clean + + dto.Orderable.Dose |> Dose.Dto.clean + + dto.Orderable.Components + |> List.iter (fun c -> + c.OrderableQuantity |> OrderVariable.Dto.clean + c.OrderableConcentration |> OrderVariable.Dto.clean + c.OrderableCount |> OrderVariable.Dto.clean + c.Dose |> Dose.Dto.clean + c.Items + |> List.iter (fun i -> + i.OrderableQuantity |> OrderVariable.Dto.clean + i.OrderableConcentration |> OrderVariable.Dto.clean + i.Dose |> Dose.Dto.clean + ) + ) + + + /// + /// Create a new Order Dto with a Continuous Prescription + /// + /// The id of the Order + /// The name of the Orderable + /// The Route of the Order + /// The Components of the Orderable + let continuous id orbN rte cmps = + Prescription.continuous Unit.NoUnit Unit.NoUnit + |> dto id orbN rte cmps + + + /// + /// Create a new Order Dto with a Once Prescription + /// + /// The id of the Order + /// The name of the Orderable + /// The Route of the Order + /// The Components of the Orderable + let once id orbN rte cmps = + Prescription.once Unit.NoUnit Unit.NoUnit + |> dto id orbN rte cmps + + + /// + /// Create a new Order Dto with a OnceTimed Prescription + /// + /// The id of the Order + /// The name of the Orderable + /// The Route of the Order + /// The Components of the Orderable + let onceTimed id orbN rte cmps = + Prescription.onceTimed Unit.NoUnit Unit.NoUnit + |> dto id orbN rte cmps + + + /// + /// Create a new Order Dto with a Discontinuous Prescription + /// + /// The id of the Order + /// The name of the Orderable + /// The Route of the Order + /// The Components of the Orderable + let discontinuous id orbN rte cmps = + Prescription.discontinuous Unit.NoUnit Unit.NoUnit + |> dto id orbN rte cmps + + + /// + /// Create a new Order Dto with a Timed Prescription + /// + /// The id of the Order + /// The name of the Orderable + /// The Route of the Order + /// The Components of the Orderable + let timed id orbN rte cmps= + Prescription.timed Unit.NoUnit Unit.NoUnit + |> dto id orbN rte cmps + + + let setToOnce (dto : Dto) = + dto.Prescription <- + dto.Prescription + |> Prescription.Dto.setToOnce + dto + + + let setToOnceTimed (dto : Dto) = + dto.Prescription <- + dto.Prescription + |> Prescription.Dto.setToOnceTimed + dto + + + let setToContinuous (dto : Dto) = + dto.Prescription <- + dto.Prescription + |> Prescription.Dto.setToContinuous + dto + + + let setToDiscontinuous (dto : Dto) = + dto.Prescription <- + dto.Prescription + |> Prescription.Dto.setToDiscontinuous + dto + + + let setToTimed (dto : Dto) = + dto.Prescription <- + dto.Prescription + |> Prescription.Dto.setToTimed + dto + diff --git a/src/Informedica.GenOrder.Lib/Types.fs b/src/Informedica.GenOrder.Lib/Types.fs index 2f9f857..b2054bf 100644 --- a/src/Informedica.GenOrder.Lib/Types.fs +++ b/src/Informedica.GenOrder.Lib/Types.fs @@ -336,11 +336,11 @@ module Types = /// the route of the order Route : string /// the prescription of the order - Prescription : string + Prescription : string[][] /// the preparation of the order - Preparation : string + Preparation : string[][] /// the administration of the order - Administration : string + Administration : string[][] /// the order itself Order : Order option /// Whether or not to us adjust diff --git a/src/Informedica.GenSolver.Lib/Variable.fs b/src/Informedica.GenSolver.Lib/Variable.fs index 07cf900..d760000 100644 --- a/src/Informedica.GenSolver.Lib/Variable.fs +++ b/src/Informedica.GenSolver.Lib/Variable.fs @@ -601,10 +601,10 @@ module Variable = /// The precision /// The minimum let toMarkdown withUnit prec min = - let b, vu = min |> toBoolValueUnit + let _, vu = min |> toBoolValueUnit let s = - $"""{if b then "[" else "<"}{vu |> ValueUnit.toDelimitedString prec}""" + $"""{vu |> ValueUnit.toDelimitedString prec}""" if withUnit then s else @@ -927,9 +927,9 @@ module Variable = /// The precision /// The maximum let toMarkdown prec max = - let b, vu = max |> toBoolValueUnit + let _, vu = max |> toBoolValueUnit - $"""{vu |> ValueUnit.toDelimitedString prec}{if b then "]" else ">"}""" + $"""{vu |> ValueUnit.toDelimitedString prec}""" @@ -1155,11 +1155,11 @@ module Variable = ValueUnit.getValue >> Array.length if vu |> count <= 10 then - $"""[{vu |> ValueUnit.toDelimitedString prec}]""" + $"""{vu |> ValueUnit.toDelimitedString prec}""" else let first3 = vu |> ValueUnit.takeFirst 3 let last3 = vu |> ValueUnit.takeLast 3 - $"[{first3 |> ValueUnit.toDelimitedString prec} .. {last3 |> ValueUnit.toDelimitedString prec}]" + $"{first3 |> ValueUnit.toDelimitedString prec} .. {last3 |> ValueUnit.toDelimitedString prec}" diff --git a/src/Server/ScenarioResult.fs b/src/Server/ScenarioResult.fs index cabba8b..b277ad5 100644 --- a/src/Server/ScenarioResult.fs +++ b/src/Server/ScenarioResult.fs @@ -452,12 +452,11 @@ let print (sc: ScenarioResult) = ord |> mapFromOrder |> Order.Dto.fromDto - |> Order.Print.printOrderToMd sc.UseAdjust sn + |> Order.Print.printOrderToTableFormat sc.UseAdjust true sn |> fun (prs, prp, adm) -> - prs |> Api.replace |> Shared.ScenarioResult.parseTextItem, - prp |> Api.replace |> Shared.ScenarioResult.parseTextItem, - adm |> Api.replace |> Shared.ScenarioResult.parseTextItem - + prs |> Array.map (Array.map (Api.replace >> Shared.ScenarioResult.parseTextItem)), + prp |> Array.map (Array.map (Api.replace >> Shared.ScenarioResult.parseTextItem)), + adm |> Array.map (Array.map (Api.replace >> Shared.ScenarioResult.parseTextItem)) ) |> Option.defaultValue (sc.Prescription, sc.Preparation, sc.Administration) { sc with diff --git a/src/Shared/Domain.fs b/src/Shared/Domain.fs index 3cf99d3..8b907da 100644 --- a/src/Shared/Domain.fs +++ b/src/Shared/Domain.fs @@ -1545,9 +1545,9 @@ module ScenarioResult = { Shape = shp DoseType = dst - Prescription = prs |> parseTextItem - Preparation = prep |> parseTextItem - Administration = adm |> parseTextItem + Prescription = prs |> Array.map (Array.map parseTextItem) + Preparation = prep |> Array.map (Array.map parseTextItem) + Administration = adm |> Array.map (Array.map parseTextItem) Order = o UseAdjust = adj } diff --git a/src/Shared/Types.fs b/src/Shared/Types.fs index 63aaab3..0a8f897 100644 --- a/src/Shared/Types.fs +++ b/src/Shared/Types.fs @@ -322,9 +322,9 @@ module Types = { Shape : string DoseType : DoseType - Prescription : TextItem[] - Preparation : TextItem[] - Administration : TextItem[] + Prescription : TextItem[][][] + Preparation : TextItem[][][] + Administration : TextItem[][][] Order : Order option UseAdjust : bool }