diff --git a/browser-platform-home-react-wsp/package-lock.json b/browser-platform-home-react-wsp/package-lock.json index a2dfc82..7a39ca3 100644 --- a/browser-platform-home-react-wsp/package-lock.json +++ b/browser-platform-home-react-wsp/package-lock.json @@ -9,6 +9,12 @@ "version": "3.0.0", "dependencies": { "@auth0/auth0-react": "^2.1.0", + "@interopio/browser-platform": "~3.0.5", + "@interopio/browser-worker": "^3.0.3", + "@interopio/home-ui-react": "~1.1.0", + "@interopio/react-hooks": "~3.0.6", + "@interopio/workspaces-api": "~3.0.4", + "@interopio/workspaces-ui-react": "~3.0.5", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", @@ -2095,6 +2101,83 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@glue42/gateway-web": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/@glue42/gateway-web/-/gateway-web-3.0.18.tgz", + "integrity": "sha512-swROglo4+fRruNpfKh17EmPOLzYgfD8NAIy4Sw1fzZkCvhmv3SLISMYsj1ILpI/g9dW3bzdYSja15L9wCjLgSA==" + }, + "node_modules/@glue42/schemas": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@glue42/schemas/-/schemas-3.22.0.tgz", + "integrity": "sha512-4eC3oIci6o09DIPYwvGCHSaGHdNPqDDnqByh0XuiOw/lA6rlZii4HfamqbCYhytEZ58dqAdyTDqyqVNnEVBuQA==", + "dependencies": { + "ajv": "^6.12.6", + "ajv-keywords": "^3.4.1" + }, + "peerDependencies": { + "log4js": "^6.4.2" + }, + "peerDependenciesMeta": { + "log4js": { + "optional": true + } + } + }, + "node_modules/@glue42/server-api": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@glue42/server-api/-/server-api-1.5.0.tgz", + "integrity": "sha512-UzmsGQPYxTqeo9WXf9fDjxNjxMcCDYryCuRcsJRC8y3dIVA8rLuIVUc7WOYKAZe+HuHyljxIkNAeQ1N771+27A==", + "dependencies": { + "@glue42/schemas": "^3.18.0", + "@types/request": "^2.48.8", + "axios": "^0.21.1", + "form-data": "^4.0.0", + "jwt-decode": "^3.1.2", + "typescript": "^4.2.4" + } + }, + "node_modules/@glue42/server-api/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@glue42/theme": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@glue42/theme/-/theme-4.0.8.tgz", + "integrity": "sha512-aMKAOdw8GJWd9MjlsVgNOOskq4ii5w1PwhPEileHfSBjEHDH0aPVfEZo/aYSlfJKO8fD2IZQUxJt8jB4rbkhAw==", + "dependencies": { + "ajv": "^7.0.3", + "bootstrap": "5.1.3" + } + }, + "node_modules/@glue42/theme/node_modules/ajv": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", + "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@glue42/theme/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "license": "Apache-2.0", @@ -2122,6 +2205,359 @@ "version": "1.2.1", "license": "BSD-3-Clause" }, + "node_modules/@interopio/browser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/browser/-/browser-3.1.0.tgz", + "integrity": "sha512-V5yZwrIl0dUl3qInRVeyqkbW7nsi5DnGaLcjh8CBnil4Mg3swftXSa6slPOFU28bnrN4GRhjrZM5TnhKpWck+Q==", + "dependencies": { + "@interopio/core": "^6.1.0", + "@interopio/desktop": "^6.0.1", + "@interopio/search-api": "^2.1.0", + "@interopio/utils": "^1.1.0", + "@interopio/workspaces-api": "^3.1.0", + "callback-registry": "^2.6.0", + "decoder-validate": "0.0.2", + "idb": "^7.1.1", + "nanoid": "^4.0.0", + "shortid": "^2.2.16" + } + }, + "node_modules/@interopio/browser-platform": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@interopio/browser-platform/-/browser-platform-3.0.5.tgz", + "integrity": "sha512-ownCNDqkLLUrmuWD9oj2XRUYP+I0OKdOqKXCnNZYA1GiaOCXkaemunNjVlbua5GbgqJc+DaCh8SX0AQoBt7tZQ==", + "dependencies": { + "@glue42/gateway-web": "^3.0.17", + "@glue42/server-api": "^1.5.0", + "@interopio/browser": "^3.0.5", + "@interopio/core": "^6.0.4", + "@interopio/desktop": "^6.0.1", + "@interopio/search-api": "^2.0.4", + "@interopio/workspaces-api": "^3.0.4", + "callback-registry": "^2.7.1", + "decoder-validate": "0.0.2", + "deep-equal": "^2.1.0", + "deepmerge": "^4.2.2", + "fast-deep-equal": "^3.1.3", + "idb": "^7.1.1", + "jsrsasign": "^10.8.6", + "nanoid": "^4.0.0", + "shortid": "^2.2.16", + "ua-parser-js": "^1.0.35" + } + }, + "node_modules/@interopio/browser-platform/node_modules/nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@interopio/browser-worker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@interopio/browser-worker/-/browser-worker-3.0.3.tgz", + "integrity": "sha512-SQgFYklwBisBhpRWxQzvuQucLhmnhBiet88hpNPCOGPPw79Nz7qfUxv6UzyiMw89CNiyhq7MutJZr3CpqOeeRQ==", + "dependencies": { + "decoder-validate": "0.0.2", + "idb": "^7.1.1", + "nanoid": "^4.0.0" + } + }, + "node_modules/@interopio/browser-worker/node_modules/nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@interopio/browser/node_modules/@interopio/workspaces-api": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-api/-/workspaces-api-3.1.0.tgz", + "integrity": "sha512-Sd0uoYjVK0jH0N1yN7EvsfvZhZN96V2sqkEOGt1f6o8mKJUby2T/6+tkcOvlNyQyCx6KrE9HiyfBMY76sCy/GA==", + "dependencies": { + "@interopio/core": "^6.1.0", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + } + }, + "node_modules/@interopio/browser/node_modules/nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@interopio/core": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@interopio/core/-/core-6.1.0.tgz", + "integrity": "sha512-/IYa/6ypYbh1YDDsul1G6qbS7TSDFAfmFtjzrYOdYIUpqt4uIpRY6hZ61GGCVuzTnkNB6eYOTwTyZ9Tbf9yD2A==", + "dependencies": { + "callback-registry": "^2.7.2", + "shortid": "^2.2.16", + "ws": "^8.12.1" + } + }, + "node_modules/@interopio/core/node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@interopio/desktop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@interopio/desktop/-/desktop-6.0.1.tgz", + "integrity": "sha512-dik/N62ofuwmxl7pKGua3s7yRaH75LZngtJeR/RT+wGmCEyZoJw7K+u7Wv1i0+CeZYkEmRC1YHBAUe/yuVWY5Q==", + "hasInstallScript": true, + "dependencies": { + "@glue42/schemas": "^3.22.0", + "@interopio/core": "^6.0.2", + "@interopio/workspaces-api": "^3.0.2", + "callback-registry": "^2.7.1", + "shortid": "2.2.8" + } + }, + "node_modules/@interopio/desktop/node_modules/shortid": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.8.tgz", + "integrity": "sha512-/DQs6HHGgeZN3B8V90yL7anMr2ehO/ldvcncCY6O8XaXTco5tbSR2iQUfVcvBOaZS8jOSK6HJtNLvDgA6OTR8w==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info." + }, + "node_modules/@interopio/golden-layout": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/golden-layout/-/golden-layout-3.1.0.tgz", + "integrity": "sha512-EukL5R82099uRYQfhXaWitRusgkyXegmHrUTOgn8OwxCCjFwoJA/8eIaCYHJhkVvr+b7Sc1kaUVCIRHoehn8Bg==", + "peerDependencies": { + "jquery": "3.5.0" + } + }, + "node_modules/@interopio/home-ui-react": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@interopio/home-ui-react/-/home-ui-react-1.1.0.tgz", + "integrity": "sha512-M1A/kJbzcyFe6drOtyiRReamCnTR6wgKNIZ3cWoEUUqXEUDhVc9JdFH09g/dwPas9wRUw3CXr4aux46UFPpJmg==", + "peerDependencies": { + "@interopio/browser": "3", + "@interopio/desktop": "6", + "@interopio/react-hooks": "3", + "@interopio/search-api": "2", + "@interopio/workspaces-api": "3", + "react": "18", + "react-dom": "18" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/@interopio/react-hooks": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@interopio/react-hooks/-/react-hooks-3.0.6.tgz", + "integrity": "sha512-XDPWket7hVOKXNreIpwVgncrPvOGOZ8t6OdEnInGlOC4VptwQqaoaXsLcjRHESObBzUXEhnXR/FbD+a2J3cM0g==", + "dependencies": { + "@interopio/browser": "^3.0.5", + "@interopio/browser-platform": "^3.0.5", + "@interopio/desktop": "^6.0.1", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": ">=16.13.1", + "react-dom": ">=16.13.1" + }, + "peerDependenciesMeta": { + "react": { + "autoinstall": false + }, + "react-dom": { + "autoinstall": false + } + } + }, + "node_modules/@interopio/search-api": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@interopio/search-api/-/search-api-2.1.0.tgz", + "integrity": "sha512-yrAYDJp2W3AWHJeE3P2yaTrnEKWxvr72n4n9VKb/0i6E6MGcOpXKx+UMAkvkFqSXCBXS396ugNhasFfKa2nFCw==", + "dependencies": { + "@interopio/core": "^6.1.0", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + } + }, + "node_modules/@interopio/search-api/node_modules/nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@interopio/theme": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@interopio/theme/-/theme-1.0.4.tgz", + "integrity": "sha512-8tqY9P6IJALnIHQ5PI8EYs/8Y3zTpNZ+uQbjY4lRbEjmhyUUf8P1D9N1C7zN/KefEvBsKtSv9vqpqcZjALyQhg==" + }, + "node_modules/@interopio/utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@interopio/utils/-/utils-1.1.0.tgz", + "integrity": "sha512-dioaldGFq/IqZun8V3yUdUHI3v8zjQmwGRmUR49PMPm8OdnUTmCEBHlnfuGDcX7Ccd1WX/BUXu//r+zZFSXtVA==", + "dependencies": { + "decoder-validate": "^0.0.2" + } + }, + "node_modules/@interopio/workspaces-api": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-api/-/workspaces-api-3.0.4.tgz", + "integrity": "sha512-P90Ju+MnSYE+KigsCNHZ2aRFmN4lccLWI0pgAExqQzcV9wwLB63Qx1GbViVyxyFfeH/zxo38QXQcj5FlVOf/Lg==", + "dependencies": { + "@interopio/core": "^6.0.4", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + } + }, + "node_modules/@interopio/workspaces-api/node_modules/nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@interopio/workspaces-ui-core": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-ui-core/-/workspaces-ui-core-3.1.0.tgz", + "integrity": "sha512-D3EcrXjor9Mrkgdg3CqZ47j4oKjzsxkobCj7wPUzligS1+ZZgIvp2fjBRdLjA8xrNFTVZwQ9ct50109/H4weWA==", + "dependencies": { + "@glue42/theme": "^4.0.6", + "@interopio/browser": "^3.1.0", + "@interopio/golden-layout": "^3.1.0", + "@interopio/theme": "^1.0.3", + "@interopio/workspaces-api": "^3.1.0", + "callback-registry": "^2.7.2", + "jquery": "3.5.0", + "resize-observer-polyfill": "^1.5.1", + "shortid": "^2.2.16" + } + }, + "node_modules/@interopio/workspaces-ui-core/node_modules/@interopio/workspaces-api": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-api/-/workspaces-api-3.1.0.tgz", + "integrity": "sha512-Sd0uoYjVK0jH0N1yN7EvsfvZhZN96V2sqkEOGt1f6o8mKJUby2T/6+tkcOvlNyQyCx6KrE9HiyfBMY76sCy/GA==", + "dependencies": { + "@interopio/core": "^6.1.0", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + } + }, + "node_modules/@interopio/workspaces-ui-core/node_modules/nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^14 || ^16 || >=18" + } + }, + "node_modules/@interopio/workspaces-ui-react": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-ui-react/-/workspaces-ui-react-3.0.5.tgz", + "integrity": "sha512-owFAjMQrwyaZ8/v1uNVKdLB2+ot25tYosw7l15blvJKOoH8KQ5BHCb1jLO96D3f7l1GaH36jVxnZAjNJJHApaQ==", + "dependencies": { + "@interopio/workspaces-ui-core": "^3.0.5", + "reactjs-popup": "^2.0.5", + "use-sync-external-store": "^1.2.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + }, + "peerDependenciesMeta": { + "react": { + "autoinstall": false + }, + "react-dom": { + "autoinstall": false + } + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "license": "ISC", @@ -2889,6 +3325,16 @@ } } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "license": "MIT", @@ -3511,6 +3957,11 @@ "@types/node": "*" } }, + "node_modules/@types/caseless": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", + "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==" + }, "node_modules/@types/connect": { "version": "3.4.35", "license": "MIT", @@ -3666,6 +4117,30 @@ "@types/react": "*" } }, + "node_modules/@types/request": { + "version": "2.48.11", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.11.tgz", + "integrity": "sha512-HuihY1+Vss5RS9ZHzRyTGIzwPTdrJBkCm/mAeLRYrOQu/MGqyezKXWOK1VhCnR+SDbp9G2mRUP+OVEqCrzpcfA==", + "dependencies": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "node_modules/@types/request/node_modules/form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "license": "MIT", @@ -3726,6 +4201,11 @@ "@types/jest": "*" } }, + "node_modules/@types/tough-cookie": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.4.tgz", + "integrity": "sha512-95Sfz4nvMAb0Nl9DTxN3j64adfwfbBPEYq14VN7zT5J5O2M9V6iZMIIQU1U+pJyl9agHYHNCqhCXgyEtIRRa5A==" + }, "node_modules/@types/trusted-types": { "version": "2.0.3", "license": "MIT" @@ -4468,6 +4948,14 @@ "node": ">=4" } }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, "node_modules/axobject-query": { "version": "3.1.1", "license": "Apache-2.0", @@ -4837,6 +5325,18 @@ "version": "1.0.0", "license": "ISC" }, + "node_modules/bootstrap": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", + "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + }, + "peerDependencies": { + "@popperjs/core": "^2.10.2" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "license": "MIT", @@ -4924,6 +5424,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callback-registry": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/callback-registry/-/callback-registry-2.7.2.tgz", + "integrity": "sha512-VVrtF21DaH0VHeNMkLDd4VGuxsYM3V3l3lwYneKVMU/6X3TRtcQszUwlAcqj2HrLcbP1NyS12LsanUwCykaz/Q==" + }, "node_modules/callsites": { "version": "3.1.0", "license": "MIT", @@ -5722,6 +6227,11 @@ "version": "10.4.3", "license": "MIT" }, + "node_modules/decoder-validate": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/decoder-validate/-/decoder-validate-0.0.2.tgz", + "integrity": "sha512-9BsqAH9Zq6CvlxKHkSrZrH2iYlhuhHcrh6uTnDvcsa9P5YEweEzt1ci+X/9STgSCE7b9BA7/QIiwhfUDDWmjxw==" + }, "node_modules/dedent": { "version": "0.7.0", "license": "MIT" @@ -10344,6 +10854,11 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jquery": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz", + "integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==" + }, "node_modules/js-sdsl": { "version": "4.4.0", "license": "MIT", @@ -10464,6 +10979,14 @@ "node": ">=0.10.0" } }, + "node_modules/jsrsasign": { + "version": "10.8.6", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.8.6.tgz", + "integrity": "sha512-bQmbVtsfbgaKBTWCKiDCPlUPbdlRIK/FzSwT3BzIgZl/cU6TqXu6pZJsCI/dJVrZ9Gir5GC4woqw9shH/v7MBw==", + "funding": { + "url": "https://github.com/kjur/jsrsasign#donations" + } + }, "node_modules/jsx-ast-utils": { "version": "3.3.3", "license": "MIT", @@ -10475,6 +10998,11 @@ "node": ">=4.0" } }, + "node_modules/jwt-decode": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", + "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + }, "node_modules/kind-of": { "version": "6.0.3", "license": "MIT", @@ -12999,6 +13527,18 @@ } } }, + "node_modules/reactjs-popup": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/reactjs-popup/-/reactjs-popup-2.0.6.tgz", + "integrity": "sha512-A+tt+x9wdgZiZjv0e2WzYLD3IfFwJALaRaqwrCSXGjo0iQdsry/EtBEbQXRSmQs7cHmOi5eytCiSlOm8k4C+dg==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/read-cache": { "version": "1.0.0", "license": "MIT", @@ -13160,6 +13700,11 @@ "version": "1.0.0", "license": "MIT" }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + }, "node_modules/resolve": { "version": "1.22.2", "license": "MIT", @@ -13677,6 +14222,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/shortid": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", + "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dependencies": { + "nanoid": "^2.1.0" + } + }, + "node_modules/shortid/node_modules/nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + }, "node_modules/side-channel": { "version": "1.0.4", "license": "MIT", @@ -14564,6 +15123,28 @@ "node": ">=4.2.0" } }, + "node_modules/ua-parser-js": { + "version": "1.0.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", + "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "engines": { + "node": "*" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "license": "MIT", @@ -14688,6 +15269,14 @@ "requires-port": "^1.0.0" } }, + "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==", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "license": "MIT" @@ -16739,6 +17328,72 @@ "@eslint/js": { "version": "8.40.0" }, + "@glue42/gateway-web": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/@glue42/gateway-web/-/gateway-web-3.0.18.tgz", + "integrity": "sha512-swROglo4+fRruNpfKh17EmPOLzYgfD8NAIy4Sw1fzZkCvhmv3SLISMYsj1ILpI/g9dW3bzdYSja15L9wCjLgSA==" + }, + "@glue42/schemas": { + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/@glue42/schemas/-/schemas-3.22.0.tgz", + "integrity": "sha512-4eC3oIci6o09DIPYwvGCHSaGHdNPqDDnqByh0XuiOw/lA6rlZii4HfamqbCYhytEZ58dqAdyTDqyqVNnEVBuQA==", + "requires": { + "ajv": "^6.12.6", + "ajv-keywords": "^3.4.1" + } + }, + "@glue42/server-api": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@glue42/server-api/-/server-api-1.5.0.tgz", + "integrity": "sha512-UzmsGQPYxTqeo9WXf9fDjxNjxMcCDYryCuRcsJRC8y3dIVA8rLuIVUc7WOYKAZe+HuHyljxIkNAeQ1N771+27A==", + "requires": { + "@glue42/schemas": "^3.18.0", + "@types/request": "^2.48.8", + "axios": "^0.21.1", + "form-data": "^4.0.0", + "jwt-decode": "^3.1.2", + "typescript": "^4.2.4" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, + "@glue42/theme": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@glue42/theme/-/theme-4.0.8.tgz", + "integrity": "sha512-aMKAOdw8GJWd9MjlsVgNOOskq4ii5w1PwhPEileHfSBjEHDH0aPVfEZo/aYSlfJKO8fD2IZQUxJt8jB4rbkhAw==", + "requires": { + "ajv": "^7.0.3", + "bootstrap": "5.1.3" + }, + "dependencies": { + "ajv": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.4.tgz", + "integrity": "sha512-nBeQgg/ZZA3u3SYxyaDvpvDtgZ/EZPF547ARgZBrG9Bhu1vKDwAIjtIf+sDtJUKa2zOcEbmRLBRSyMraS/Oy1A==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, "@humanwhocodes/config-array": { "version": "0.11.8", "requires": { @@ -16753,6 +17408,242 @@ "@humanwhocodes/object-schema": { "version": "1.2.1" }, + "@interopio/browser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/browser/-/browser-3.1.0.tgz", + "integrity": "sha512-V5yZwrIl0dUl3qInRVeyqkbW7nsi5DnGaLcjh8CBnil4Mg3swftXSa6slPOFU28bnrN4GRhjrZM5TnhKpWck+Q==", + "requires": { + "@interopio/core": "^6.1.0", + "@interopio/desktop": "^6.0.1", + "@interopio/search-api": "^2.1.0", + "@interopio/utils": "^1.1.0", + "@interopio/workspaces-api": "^3.1.0", + "callback-registry": "^2.6.0", + "decoder-validate": "0.0.2", + "idb": "^7.1.1", + "nanoid": "^4.0.0", + "shortid": "^2.2.16" + }, + "dependencies": { + "@interopio/workspaces-api": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-api/-/workspaces-api-3.1.0.tgz", + "integrity": "sha512-Sd0uoYjVK0jH0N1yN7EvsfvZhZN96V2sqkEOGt1f6o8mKJUby2T/6+tkcOvlNyQyCx6KrE9HiyfBMY76sCy/GA==", + "requires": { + "@interopio/core": "^6.1.0", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + } + }, + "nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==" + } + } + }, + "@interopio/browser-platform": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@interopio/browser-platform/-/browser-platform-3.0.5.tgz", + "integrity": "sha512-ownCNDqkLLUrmuWD9oj2XRUYP+I0OKdOqKXCnNZYA1GiaOCXkaemunNjVlbua5GbgqJc+DaCh8SX0AQoBt7tZQ==", + "requires": { + "@glue42/gateway-web": "^3.0.17", + "@glue42/server-api": "^1.5.0", + "@interopio/browser": "^3.0.5", + "@interopio/core": "^6.0.4", + "@interopio/desktop": "^6.0.1", + "@interopio/search-api": "^2.0.4", + "@interopio/workspaces-api": "^3.0.4", + "callback-registry": "^2.7.1", + "decoder-validate": "0.0.2", + "deep-equal": "^2.1.0", + "deepmerge": "^4.2.2", + "fast-deep-equal": "^3.1.3", + "idb": "^7.1.1", + "jsrsasign": "^10.8.6", + "nanoid": "^4.0.0", + "shortid": "^2.2.16", + "ua-parser-js": "^1.0.35" + }, + "dependencies": { + "nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==" + } + } + }, + "@interopio/browser-worker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@interopio/browser-worker/-/browser-worker-3.0.3.tgz", + "integrity": "sha512-SQgFYklwBisBhpRWxQzvuQucLhmnhBiet88hpNPCOGPPw79Nz7qfUxv6UzyiMw89CNiyhq7MutJZr3CpqOeeRQ==", + "requires": { + "decoder-validate": "0.0.2", + "idb": "^7.1.1", + "nanoid": "^4.0.0" + }, + "dependencies": { + "nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==" + } + } + }, + "@interopio/core": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@interopio/core/-/core-6.1.0.tgz", + "integrity": "sha512-/IYa/6ypYbh1YDDsul1G6qbS7TSDFAfmFtjzrYOdYIUpqt4uIpRY6hZ61GGCVuzTnkNB6eYOTwTyZ9Tbf9yD2A==", + "requires": { + "callback-registry": "^2.7.2", + "shortid": "^2.2.16", + "ws": "^8.12.1" + }, + "dependencies": { + "ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "requires": {} + } + } + }, + "@interopio/desktop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@interopio/desktop/-/desktop-6.0.1.tgz", + "integrity": "sha512-dik/N62ofuwmxl7pKGua3s7yRaH75LZngtJeR/RT+wGmCEyZoJw7K+u7Wv1i0+CeZYkEmRC1YHBAUe/yuVWY5Q==", + "requires": { + "@glue42/schemas": "^3.22.0", + "@interopio/core": "^6.0.2", + "@interopio/workspaces-api": "^3.0.2", + "callback-registry": "^2.7.1", + "shortid": "2.2.8" + }, + "dependencies": { + "shortid": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.8.tgz", + "integrity": "sha512-/DQs6HHGgeZN3B8V90yL7anMr2ehO/ldvcncCY6O8XaXTco5tbSR2iQUfVcvBOaZS8jOSK6HJtNLvDgA6OTR8w==" + } + } + }, + "@interopio/golden-layout": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/golden-layout/-/golden-layout-3.1.0.tgz", + "integrity": "sha512-EukL5R82099uRYQfhXaWitRusgkyXegmHrUTOgn8OwxCCjFwoJA/8eIaCYHJhkVvr+b7Sc1kaUVCIRHoehn8Bg==", + "requires": {} + }, + "@interopio/home-ui-react": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@interopio/home-ui-react/-/home-ui-react-1.1.0.tgz", + "integrity": "sha512-M1A/kJbzcyFe6drOtyiRReamCnTR6wgKNIZ3cWoEUUqXEUDhVc9JdFH09g/dwPas9wRUw3CXr4aux46UFPpJmg==", + "requires": {} + }, + "@interopio/react-hooks": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@interopio/react-hooks/-/react-hooks-3.0.6.tgz", + "integrity": "sha512-XDPWket7hVOKXNreIpwVgncrPvOGOZ8t6OdEnInGlOC4VptwQqaoaXsLcjRHESObBzUXEhnXR/FbD+a2J3cM0g==", + "requires": { + "@interopio/browser": "^3.0.5", + "@interopio/browser-platform": "^3.0.5", + "@interopio/desktop": "^6.0.1", + "prop-types": "^15.7.2" + } + }, + "@interopio/search-api": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@interopio/search-api/-/search-api-2.1.0.tgz", + "integrity": "sha512-yrAYDJp2W3AWHJeE3P2yaTrnEKWxvr72n4n9VKb/0i6E6MGcOpXKx+UMAkvkFqSXCBXS396ugNhasFfKa2nFCw==", + "requires": { + "@interopio/core": "^6.1.0", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + }, + "dependencies": { + "nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==" + } + } + }, + "@interopio/theme": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@interopio/theme/-/theme-1.0.4.tgz", + "integrity": "sha512-8tqY9P6IJALnIHQ5PI8EYs/8Y3zTpNZ+uQbjY4lRbEjmhyUUf8P1D9N1C7zN/KefEvBsKtSv9vqpqcZjALyQhg==" + }, + "@interopio/utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@interopio/utils/-/utils-1.1.0.tgz", + "integrity": "sha512-dioaldGFq/IqZun8V3yUdUHI3v8zjQmwGRmUR49PMPm8OdnUTmCEBHlnfuGDcX7Ccd1WX/BUXu//r+zZFSXtVA==", + "requires": { + "decoder-validate": "^0.0.2" + } + }, + "@interopio/workspaces-api": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-api/-/workspaces-api-3.0.4.tgz", + "integrity": "sha512-P90Ju+MnSYE+KigsCNHZ2aRFmN4lccLWI0pgAExqQzcV9wwLB63Qx1GbViVyxyFfeH/zxo38QXQcj5FlVOf/Lg==", + "requires": { + "@interopio/core": "^6.0.4", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + }, + "dependencies": { + "nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==" + } + } + }, + "@interopio/workspaces-ui-core": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-ui-core/-/workspaces-ui-core-3.1.0.tgz", + "integrity": "sha512-D3EcrXjor9Mrkgdg3CqZ47j4oKjzsxkobCj7wPUzligS1+ZZgIvp2fjBRdLjA8xrNFTVZwQ9ct50109/H4weWA==", + "requires": { + "@glue42/theme": "^4.0.6", + "@interopio/browser": "^3.1.0", + "@interopio/golden-layout": "^3.1.0", + "@interopio/theme": "^1.0.3", + "@interopio/workspaces-api": "^3.1.0", + "callback-registry": "^2.7.2", + "jquery": "3.5.0", + "resize-observer-polyfill": "^1.5.1", + "shortid": "^2.2.16" + }, + "dependencies": { + "@interopio/workspaces-api": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-api/-/workspaces-api-3.1.0.tgz", + "integrity": "sha512-Sd0uoYjVK0jH0N1yN7EvsfvZhZN96V2sqkEOGt1f6o8mKJUby2T/6+tkcOvlNyQyCx6KrE9HiyfBMY76sCy/GA==", + "requires": { + "@interopio/core": "^6.1.0", + "callback-registry": "^2.5.2", + "decoder-validate": "0.0.2", + "nanoid": "^4.0.0" + } + }, + "nanoid": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz", + "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==" + } + } + }, + "@interopio/workspaces-ui-react": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@interopio/workspaces-ui-react/-/workspaces-ui-react-3.0.5.tgz", + "integrity": "sha512-owFAjMQrwyaZ8/v1uNVKdLB2+ot25tYosw7l15blvJKOoH8KQ5BHCb1jLO96D3f7l1GaH36jVxnZAjNJJHApaQ==", + "requires": { + "@interopio/workspaces-ui-core": "^3.0.5", + "reactjs-popup": "^2.0.5", + "use-sync-external-store": "^1.2.0" + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "requires": { @@ -17224,6 +18115,12 @@ "source-map": "^0.7.3" } }, + "@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "peer": true + }, "@rollup/plugin-babel": { "version": "5.3.1", "requires": { @@ -17581,6 +18478,11 @@ "@types/node": "*" } }, + "@types/caseless": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", + "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==" + }, "@types/connect": { "version": "3.4.35", "requires": { @@ -17710,6 +18612,29 @@ "@types/react": "*" } }, + "@types/request": { + "version": "2.48.11", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.11.tgz", + "integrity": "sha512-HuihY1+Vss5RS9ZHzRyTGIzwPTdrJBkCm/mAeLRYrOQu/MGqyezKXWOK1VhCnR+SDbp9G2mRUP+OVEqCrzpcfA==", + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + }, + "dependencies": { + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, "@types/resolve": { "version": "1.17.1", "requires": { @@ -17760,6 +18685,11 @@ "@types/jest": "*" } }, + "@types/tough-cookie": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.4.tgz", + "integrity": "sha512-95Sfz4nvMAb0Nl9DTxN3j64adfwfbBPEYq14VN7zT5J5O2M9V6iZMIIQU1U+pJyl9agHYHNCqhCXgyEtIRRa5A==" + }, "@types/trusted-types": { "version": "2.0.3" }, @@ -18199,6 +19129,14 @@ "axe-core": { "version": "4.7.0" }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + }, "axobject-query": { "version": "3.1.1", "requires": { @@ -18448,6 +19386,12 @@ "boolbase": { "version": "1.0.0" }, + "bootstrap": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.3.tgz", + "integrity": "sha512-fcQztozJ8jToQWXxVuEyXWW+dSo8AiXWKwiSSrKWsRB/Qt+Ewwza+JWoLKiTuQLaEPhdNAJ7+Dosc9DOIqNy7Q==", + "requires": {} + }, "brace-expansion": { "version": "1.1.11", "requires": { @@ -18495,6 +19439,11 @@ "get-intrinsic": "^1.0.2" } }, + "callback-registry": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/callback-registry/-/callback-registry-2.7.2.tgz", + "integrity": "sha512-VVrtF21DaH0VHeNMkLDd4VGuxsYM3V3l3lwYneKVMU/6X3TRtcQszUwlAcqj2HrLcbP1NyS12LsanUwCykaz/Q==" + }, "callsites": { "version": "3.1.0" }, @@ -18948,6 +19897,11 @@ "decimal.js": { "version": "10.4.3" }, + "decoder-validate": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/decoder-validate/-/decoder-validate-0.0.2.tgz", + "integrity": "sha512-9BsqAH9Zq6CvlxKHkSrZrH2iYlhuhHcrh6uTnDvcsa9P5YEweEzt1ci+X/9STgSCE7b9BA7/QIiwhfUDDWmjxw==" + }, "dedent": { "version": "0.7.0" }, @@ -21739,6 +22693,11 @@ "jiti": { "version": "1.18.2" }, + "jquery": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz", + "integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==" + }, "js-sdsl": { "version": "4.4.0" }, @@ -21812,6 +22771,11 @@ "jsonpointer": { "version": "5.0.1" }, + "jsrsasign": { + "version": "10.8.6", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.8.6.tgz", + "integrity": "sha512-bQmbVtsfbgaKBTWCKiDCPlUPbdlRIK/FzSwT3BzIgZl/cU6TqXu6pZJsCI/dJVrZ9Gir5GC4woqw9shH/v7MBw==" + }, "jsx-ast-utils": { "version": "3.3.3", "requires": { @@ -21819,6 +22783,11 @@ "object.assign": "^4.1.3" } }, + "jwt-decode": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", + "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + }, "kind-of": { "version": "6.0.3" }, @@ -23169,6 +24138,12 @@ "workbox-webpack-plugin": "^6.4.1" } }, + "reactjs-popup": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/reactjs-popup/-/reactjs-popup-2.0.6.tgz", + "integrity": "sha512-A+tt+x9wdgZiZjv0e2WzYLD3IfFwJALaRaqwrCSXGjo0iQdsry/EtBEbQXRSmQs7cHmOi5eytCiSlOm8k4C+dg==", + "requires": {} + }, "read-cache": { "version": "1.0.0", "requires": { @@ -23275,6 +24250,11 @@ "requires-port": { "version": "1.0.0" }, + "resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + }, "resolve": { "version": "1.22.2", "requires": { @@ -23568,6 +24548,21 @@ "shell-quote": { "version": "1.8.1" }, + "shortid": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", + "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", + "requires": { + "nanoid": "^2.1.0" + }, + "dependencies": { + "nanoid": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", + "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" + } + } + }, "side-channel": { "version": "1.0.4", "requires": { @@ -24121,6 +25116,11 @@ "typescript": { "version": "4.9.5" }, + "ua-parser-js": { + "version": "1.0.37", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz", + "integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==" + }, "unbox-primitive": { "version": "1.0.2", "requires": { @@ -24184,6 +25184,12 @@ "requires-port": "^1.0.0" } }, + "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==", + "requires": {} + }, "util-deprecate": { "version": "1.0.2" }, diff --git a/browser-platform-home-react-wsp/package.json b/browser-platform-home-react-wsp/package.json index 6144964..7f52b2e 100644 --- a/browser-platform-home-react-wsp/package.json +++ b/browser-platform-home-react-wsp/package.json @@ -4,6 +4,12 @@ "private": true, "dependencies": { "@auth0/auth0-react": "^2.1.0", + "@interopio/browser-platform": "~3.0.5", + "@interopio/browser-worker": "~3.0.3", + "@interopio/home-ui-react": "~1.1.0", + "@interopio/react-hooks": "~3.0.6", + "@interopio/workspaces-api": "~3.0.4", + "@interopio/workspaces-ui-react": "~3.0.5", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", diff --git a/browser-platform-home-react-wsp/public/web.worker.umd.js b/browser-platform-home-react-wsp/public/web.worker.umd.js new file mode 100644 index 0000000..2161602 --- /dev/null +++ b/browser-platform-home-react-wsp/public/web.worker.umd.js @@ -0,0 +1,1415 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.web = global.web || {}, global.web.worker = {}))); +})(this, (function (exports) { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + + function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + var serviceWorkerBroadcastChannelName = "glue42-core-worker"; + var platformPingTimeoutMS = 3000; + var platformOpenTimeoutMS = 60000; + var dbName = "glue42core"; + var dbVersion = 2; + + /** + * Wraps values in an `Ok` type. + * + * Example: `ok(5) // => {ok: true, result: 5}` + */ + var ok = function (result) { return ({ ok: true, result: result }); }; + /** + * Wraps errors in an `Err` type. + * + * Example: `err('on fire') // => {ok: false, error: 'on fire'}` + */ + var err = function (error) { return ({ ok: false, error: error }); }; + /** + * Create a `Promise` that either resolves with the result of `Ok` or rejects + * with the error of `Err`. + */ + var asPromise = function (r) { + return r.ok === true ? Promise.resolve(r.result) : Promise.reject(r.error); + }; + /** + * Unwraps a `Result` and returns either the result of an `Ok`, or + * `defaultValue`. + * + * Example: + * ``` + * Result.withDefault(5, number().run(json)) + * ``` + * + * It would be nice if `Decoder` had an instance method that mirrored this + * function. Such a method would look something like this: + * ``` + * class Decoder { + * runWithDefault = (defaultValue: A, json: any): A => + * Result.withDefault(defaultValue, this.run(json)); + * } + * + * number().runWithDefault(5, json) + * ``` + * Unfortunately, the type of `defaultValue: A` on the method causes issues + * with type inference on the `object` decoder in some situations. While these + * inference issues can be solved by providing the optional type argument for + * `object`s, the extra trouble and confusion doesn't seem worth it. + */ + var withDefault = function (defaultValue, r) { + return r.ok === true ? r.result : defaultValue; + }; + /** + * Return the successful result, or throw an error. + */ + var withException = function (r) { + if (r.ok === true) { + return r.result; + } + else { + throw r.error; + } + }; + /** + * Apply `f` to the result of an `Ok`, or pass the error through. + */ + var map = function (f, r) { + return r.ok === true ? ok(f(r.result)) : r; + }; + /** + * Apply `f` to the result of two `Ok`s, or pass an error through. If both + * `Result`s are errors then the first one is returned. + */ + var map2 = function (f, ar, br) { + return ar.ok === false ? ar : + br.ok === false ? br : + ok(f(ar.result, br.result)); + }; + /** + * Apply `f` to the error of an `Err`, or pass the success through. + */ + var mapError = function (f, r) { + return r.ok === true ? r : err(f(r.error)); + }; + /** + * Chain together a sequence of computations that may fail, similar to a + * `Promise`. If the first computation fails then the error will propagate + * through. If it succeeds, then `f` will be applied to the value, returning a + * new `Result`. + */ + var andThen = function (f, r) { + return r.ok === true ? f(r.result) : r; + }; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + + + + var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + }; + + function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + } + + function isEqual(a, b) { + if (a === b) { + return true; + } + if (a === null && b === null) { + return true; + } + if (typeof (a) !== typeof (b)) { + return false; + } + if (typeof (a) === 'object') { + // Array + if (Array.isArray(a)) { + if (!Array.isArray(b)) { + return false; + } + if (a.length !== b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!isEqual(a[i], b[i])) { + return false; + } + } + return true; + } + // Hash table + var keys = Object.keys(a); + if (keys.length !== Object.keys(b).length) { + return false; + } + for (var i = 0; i < keys.length; i++) { + if (!b.hasOwnProperty(keys[i])) { + return false; + } + if (!isEqual(a[keys[i]], b[keys[i]])) { + return false; + } + } + return true; + } + } + /* + * Helpers + */ + var isJsonArray = function (json) { return Array.isArray(json); }; + var isJsonObject = function (json) { + return typeof json === 'object' && json !== null && !isJsonArray(json); + }; + var typeString = function (json) { + switch (typeof json) { + case 'string': + return 'a string'; + case 'number': + return 'a number'; + case 'boolean': + return 'a boolean'; + case 'undefined': + return 'undefined'; + case 'object': + if (json instanceof Array) { + return 'an array'; + } + else if (json === null) { + return 'null'; + } + else { + return 'an object'; + } + default: + return JSON.stringify(json); + } + }; + var expectedGot = function (expected, got) { + return "expected " + expected + ", got " + typeString(got); + }; + var printPath = function (paths) { + return paths.map(function (path) { return (typeof path === 'string' ? "." + path : "[" + path + "]"); }).join(''); + }; + var prependAt = function (newAt, _a) { + var at = _a.at, rest = __rest(_a, ["at"]); + return (__assign({ at: newAt + (at || '') }, rest)); + }; + /** + * Decoders transform json objects with unknown structure into known and + * verified forms. You can create objects of type `Decoder` with either the + * primitive decoder functions, such as `boolean()` and `string()`, or by + * applying higher-order decoders to the primitives, such as `array(boolean())` + * or `dict(string())`. + * + * Each of the decoder functions are available both as a static method on + * `Decoder` and as a function alias -- for example the string decoder is + * defined at `Decoder.string()`, but is also aliased to `string()`. Using the + * function aliases exported with the library is recommended. + * + * `Decoder` exposes a number of 'run' methods, which all decode json in the + * same way, but communicate success and failure in different ways. The `map` + * and `andThen` methods modify decoders without having to call a 'run' method. + * + * Alternatively, the main decoder `run()` method returns an object of type + * `Result`. This library provides a number of helper + * functions for dealing with the `Result` type, so you can do all the same + * things with a `Result` as with the decoder methods. + */ + var Decoder = /** @class */ (function () { + /** + * The Decoder class constructor is kept private to separate the internal + * `decode` function from the external `run` function. The distinction + * between the two functions is that `decode` returns a + * `Partial` on failure, which contains an unfinished error + * report. When `run` is called on a decoder, the relevant series of `decode` + * calls is made, and then on failure the resulting `Partial` + * is turned into a `DecoderError` by filling in the missing information. + * + * While hiding the constructor may seem restrictive, leveraging the + * provided decoder combinators and helper functions such as + * `andThen` and `map` should be enough to build specialized decoders as + * needed. + */ + function Decoder(decode) { + var _this = this; + this.decode = decode; + /** + * Run the decoder and return a `Result` with either the decoded value or a + * `DecoderError` containing the json input, the location of the error, and + * the error message. + * + * Examples: + * ``` + * number().run(12) + * // => {ok: true, result: 12} + * + * string().run(9001) + * // => + * // { + * // ok: false, + * // error: { + * // kind: 'DecoderError', + * // input: 9001, + * // at: 'input', + * // message: 'expected a string, got 9001' + * // } + * // } + * ``` + */ + this.run = function (json) { + return mapError(function (error) { return ({ + kind: 'DecoderError', + input: json, + at: 'input' + (error.at || ''), + message: error.message || '' + }); }, _this.decode(json)); + }; + /** + * Run the decoder as a `Promise`. + */ + this.runPromise = function (json) { return asPromise(_this.run(json)); }; + /** + * Run the decoder and return the value on success, or throw an exception + * with a formatted error string. + */ + this.runWithException = function (json) { return withException(_this.run(json)); }; + /** + * Construct a new decoder that applies a transformation to the decoded + * result. If the decoder succeeds then `f` will be applied to the value. If + * it fails the error will propagated through. + * + * Example: + * ``` + * number().map(x => x * 5).run(10) + * // => {ok: true, result: 50} + * ``` + */ + this.map = function (f) { + return new Decoder(function (json) { return map(f, _this.decode(json)); }); + }; + /** + * Chain together a sequence of decoders. The first decoder will run, and + * then the function will determine what decoder to run second. If the result + * of the first decoder succeeds then `f` will be applied to the decoded + * value. If it fails the error will propagate through. + * + * This is a very powerful method -- it can act as both the `map` and `where` + * methods, can improve error messages for edge cases, and can be used to + * make a decoder for custom types. + * + * Example of adding an error message: + * ``` + * const versionDecoder = valueAt(['version'], number()); + * const infoDecoder3 = object({a: boolean()}); + * + * const decoder = versionDecoder.andThen(version => { + * switch (version) { + * case 3: + * return infoDecoder3; + * default: + * return fail(`Unable to decode info, version ${version} is not supported.`); + * } + * }); + * + * decoder.run({version: 3, a: true}) + * // => {ok: true, result: {a: true}} + * + * decoder.run({version: 5, x: 'abc'}) + * // => + * // { + * // ok: false, + * // error: {... message: 'Unable to decode info, version 5 is not supported.'} + * // } + * ``` + * + * Example of decoding a custom type: + * ``` + * // nominal type for arrays with a length of at least one + * type NonEmptyArray = T[] & { __nonEmptyArrayBrand__: void }; + * + * const nonEmptyArrayDecoder = (values: Decoder): Decoder> => + * array(values).andThen(arr => + * arr.length > 0 + * ? succeed(createNonEmptyArray(arr)) + * : fail(`expected a non-empty array, got an empty array`) + * ); + * ``` + */ + this.andThen = function (f) { + return new Decoder(function (json) { + return andThen(function (value) { return f(value).decode(json); }, _this.decode(json)); + }); + }; + /** + * Add constraints to a decoder _without_ changing the resulting type. The + * `test` argument is a predicate function which returns true for valid + * inputs. When `test` fails on an input, the decoder fails with the given + * `errorMessage`. + * + * ``` + * const chars = (length: number): Decoder => + * string().where( + * (s: string) => s.length === length, + * `expected a string of length ${length}` + * ); + * + * chars(5).run('12345') + * // => {ok: true, result: '12345'} + * + * chars(2).run('HELLO') + * // => {ok: false, error: {... message: 'expected a string of length 2'}} + * + * chars(12).run(true) + * // => {ok: false, error: {... message: 'expected a string, got a boolean'}} + * ``` + */ + this.where = function (test, errorMessage) { + return _this.andThen(function (value) { return (test(value) ? Decoder.succeed(value) : Decoder.fail(errorMessage)); }); + }; + } + /** + * Decoder primitive that validates strings, and fails on all other input. + */ + Decoder.string = function () { + return new Decoder(function (json) { + return typeof json === 'string' + ? ok(json) + : err({ message: expectedGot('a string', json) }); + }); + }; + /** + * Decoder primitive that validates numbers, and fails on all other input. + */ + Decoder.number = function () { + return new Decoder(function (json) { + return typeof json === 'number' + ? ok(json) + : err({ message: expectedGot('a number', json) }); + }); + }; + /** + * Decoder primitive that validates booleans, and fails on all other input. + */ + Decoder.boolean = function () { + return new Decoder(function (json) { + return typeof json === 'boolean' + ? ok(json) + : err({ message: expectedGot('a boolean', json) }); + }); + }; + Decoder.constant = function (value) { + return new Decoder(function (json) { + return isEqual(json, value) + ? ok(value) + : err({ message: "expected " + JSON.stringify(value) + ", got " + JSON.stringify(json) }); + }); + }; + Decoder.object = function (decoders) { + return new Decoder(function (json) { + if (isJsonObject(json) && decoders) { + var obj = {}; + for (var key in decoders) { + if (decoders.hasOwnProperty(key)) { + var r = decoders[key].decode(json[key]); + if (r.ok === true) { + // tslint:disable-next-line:strict-type-predicates + if (r.result !== undefined) { + obj[key] = r.result; + } + } + else if (json[key] === undefined) { + return err({ message: "the key '" + key + "' is required but was not present" }); + } + else { + return err(prependAt("." + key, r.error)); + } + } + } + return ok(obj); + } + else if (isJsonObject(json)) { + return ok(json); + } + else { + return err({ message: expectedGot('an object', json) }); + } + }); + }; + Decoder.array = function (decoder) { + return new Decoder(function (json) { + if (isJsonArray(json) && decoder) { + var decodeValue_1 = function (v, i) { + return mapError(function (err$$1) { return prependAt("[" + i + "]", err$$1); }, decoder.decode(v)); + }; + return json.reduce(function (acc, v, i) { + return map2(function (arr, result) { return arr.concat([result]); }, acc, decodeValue_1(v, i)); + }, ok([])); + } + else if (isJsonArray(json)) { + return ok(json); + } + else { + return err({ message: expectedGot('an array', json) }); + } + }); + }; + Decoder.tuple = function (decoders) { + return new Decoder(function (json) { + if (isJsonArray(json)) { + if (json.length !== decoders.length) { + return err({ + message: "expected a tuple of length " + decoders.length + ", got one of length " + json.length + }); + } + var result = []; + for (var i = 0; i < decoders.length; i++) { + var nth = decoders[i].decode(json[i]); + if (nth.ok) { + result[i] = nth.result; + } + else { + return err(prependAt("[" + i + "]", nth.error)); + } + } + return ok(result); + } + else { + return err({ message: expectedGot("a tuple of length " + decoders.length, json) }); + } + }); + }; + Decoder.union = function (ad, bd) { + var decoders = []; + for (var _i = 2; _i < arguments.length; _i++) { + decoders[_i - 2] = arguments[_i]; + } + return Decoder.oneOf.apply(Decoder, [ad, bd].concat(decoders)); + }; + Decoder.intersection = function (ad, bd) { + var ds = []; + for (var _i = 2; _i < arguments.length; _i++) { + ds[_i - 2] = arguments[_i]; + } + return new Decoder(function (json) { + return [ad, bd].concat(ds).reduce(function (acc, decoder) { return map2(Object.assign, acc, decoder.decode(json)); }, ok({})); + }); + }; + /** + * Escape hatch to bypass validation. Always succeeds and types the result as + * `any`. Useful for defining decoders incrementally, particularly for + * complex objects. + * + * Example: + * ``` + * interface User { + * name: string; + * complexUserData: ComplexType; + * } + * + * const userDecoder: Decoder = object({ + * name: string(), + * complexUserData: anyJson() + * }); + * ``` + */ + Decoder.anyJson = function () { return new Decoder(function (json) { return ok(json); }); }; + /** + * Decoder identity function which always succeeds and types the result as + * `unknown`. + */ + Decoder.unknownJson = function () { + return new Decoder(function (json) { return ok(json); }); + }; + /** + * Decoder for json objects where the keys are unknown strings, but the values + * should all be of the same type. + * + * Example: + * ``` + * dict(number()).run({chocolate: 12, vanilla: 10, mint: 37}); + * // => {ok: true, result: {chocolate: 12, vanilla: 10, mint: 37}} + * ``` + */ + Decoder.dict = function (decoder) { + return new Decoder(function (json) { + if (isJsonObject(json)) { + var obj = {}; + for (var key in json) { + if (json.hasOwnProperty(key)) { + var r = decoder.decode(json[key]); + if (r.ok === true) { + obj[key] = r.result; + } + else { + return err(prependAt("." + key, r.error)); + } + } + } + return ok(obj); + } + else { + return err({ message: expectedGot('an object', json) }); + } + }); + }; + /** + * Decoder for values that may be `undefined`. This is primarily helpful for + * decoding interfaces with optional fields. + * + * Example: + * ``` + * interface User { + * id: number; + * isOwner?: boolean; + * } + * + * const decoder: Decoder = object({ + * id: number(), + * isOwner: optional(boolean()) + * }); + * ``` + */ + Decoder.optional = function (decoder) { + return new Decoder(function (json) { return (json === undefined || json === null ? ok(undefined) : decoder.decode(json)); }); + }; + /** + * Decoder that attempts to run each decoder in `decoders` and either succeeds + * with the first successful decoder, or fails after all decoders have failed. + * + * Note that `oneOf` expects the decoders to all have the same return type, + * while `union` creates a decoder for the union type of all the input + * decoders. + * + * Examples: + * ``` + * oneOf(string(), number().map(String)) + * oneOf(constant('start'), constant('stop'), succeed('unknown')) + * ``` + */ + Decoder.oneOf = function () { + var decoders = []; + for (var _i = 0; _i < arguments.length; _i++) { + decoders[_i] = arguments[_i]; + } + return new Decoder(function (json) { + var errors = []; + for (var i = 0; i < decoders.length; i++) { + var r = decoders[i].decode(json); + if (r.ok === true) { + return r; + } + else { + errors[i] = r.error; + } + } + var errorsList = errors + .map(function (error) { return "at error" + (error.at || '') + ": " + error.message; }) + .join('", "'); + return err({ + message: "expected a value matching one of the decoders, got the errors [\"" + errorsList + "\"]" + }); + }); + }; + /** + * Decoder that always succeeds with either the decoded value, or a fallback + * default value. + */ + Decoder.withDefault = function (defaultValue, decoder) { + return new Decoder(function (json) { + return ok(withDefault(defaultValue, decoder.decode(json))); + }); + }; + /** + * Decoder that pulls a specific field out of a json structure, instead of + * decoding and returning the full structure. The `paths` array describes the + * object keys and array indices to traverse, so that values can be pulled out + * of a nested structure. + * + * Example: + * ``` + * const decoder = valueAt(['a', 'b', 0], string()); + * + * decoder.run({a: {b: ['surprise!']}}) + * // => {ok: true, result: 'surprise!'} + * + * decoder.run({a: {x: 'cats'}}) + * // => {ok: false, error: {... at: 'input.a.b[0]' message: 'path does not exist'}} + * ``` + * + * Note that the `decoder` is ran on the value found at the last key in the + * path, even if the last key is not found. This allows the `optional` + * decoder to succeed when appropriate. + * ``` + * const optionalDecoder = valueAt(['a', 'b', 'c'], optional(string())); + * + * optionalDecoder.run({a: {b: {c: 'surprise!'}}}) + * // => {ok: true, result: 'surprise!'} + * + * optionalDecoder.run({a: {b: 'cats'}}) + * // => {ok: false, error: {... at: 'input.a.b.c' message: 'expected an object, got "cats"'} + * + * optionalDecoder.run({a: {b: {z: 1}}}) + * // => {ok: true, result: undefined} + * ``` + */ + Decoder.valueAt = function (paths, decoder) { + return new Decoder(function (json) { + var jsonAtPath = json; + for (var i = 0; i < paths.length; i++) { + if (jsonAtPath === undefined) { + return err({ + at: printPath(paths.slice(0, i + 1)), + message: 'path does not exist' + }); + } + else if (typeof paths[i] === 'string' && !isJsonObject(jsonAtPath)) { + return err({ + at: printPath(paths.slice(0, i + 1)), + message: expectedGot('an object', jsonAtPath) + }); + } + else if (typeof paths[i] === 'number' && !isJsonArray(jsonAtPath)) { + return err({ + at: printPath(paths.slice(0, i + 1)), + message: expectedGot('an array', jsonAtPath) + }); + } + else { + jsonAtPath = jsonAtPath[paths[i]]; + } + } + return mapError(function (error) { + return jsonAtPath === undefined + ? { at: printPath(paths), message: 'path does not exist' } + : prependAt(printPath(paths), error); + }, decoder.decode(jsonAtPath)); + }); + }; + /** + * Decoder that ignores the input json and always succeeds with `fixedValue`. + */ + Decoder.succeed = function (fixedValue) { + return new Decoder(function (json) { return ok(fixedValue); }); + }; + /** + * Decoder that ignores the input json and always fails with `errorMessage`. + */ + Decoder.fail = function (errorMessage) { + return new Decoder(function (json) { return err({ message: errorMessage }); }); + }; + /** + * Decoder that allows for validating recursive data structures. Unlike with + * functions, decoders assigned to variables can't reference themselves + * before they are fully defined. We can avoid prematurely referencing the + * decoder by wrapping it in a function that won't be called until use, at + * which point the decoder has been defined. + * + * Example: + * ``` + * interface Comment { + * msg: string; + * replies: Comment[]; + * } + * + * const decoder: Decoder = object({ + * msg: string(), + * replies: lazy(() => array(decoder)) + * }); + * ``` + */ + Decoder.lazy = function (mkDecoder) { + return new Decoder(function (json) { return mkDecoder().decode(json); }); + }; + return Decoder; + }()); + + /* tslint:disable:variable-name */ + /** See `Decoder.string` */ + var string = Decoder.string; + /** See `Decoder.number` */ + Decoder.number; + /** See `Decoder.boolean` */ + var boolean = Decoder.boolean; + /** See `Decoder.anyJson` */ + var anyJson = Decoder.anyJson; + /** See `Decoder.unknownJson` */ + Decoder.unknownJson; + /** See `Decoder.constant` */ + Decoder.constant; + /** See `Decoder.object` */ + var object = Decoder.object; + /** See `Decoder.array` */ + var array = Decoder.array; + /** See `Decoder.tuple` */ + Decoder.tuple; + /** See `Decoder.dict` */ + Decoder.dict; + /** See `Decoder.optional` */ + var optional = Decoder.optional; + /** See `Decoder.oneOf` */ + Decoder.oneOf; + /** See `Decoder.union` */ + Decoder.union; + /** See `Decoder.intersection` */ + Decoder.intersection; + /** See `Decoder.withDefault` */ + Decoder.withDefault; + /** See `Decoder.valueAt` */ + Decoder.valueAt; + /** See `Decoder.succeed` */ + Decoder.succeed; + /** See `Decoder.fail` */ + var fail = Decoder.fail; + /** See `Decoder.lazy` */ + Decoder.lazy; + + /* eslint-disable @typescript-eslint/no-explicit-any */ + var nonEmptyStringDecoder = string().where(function (s) { return s.length > 0; }, "Expected a non-empty string"); + var functionCheck = function (input, propDescription) { + var providedType = typeof input; + return providedType === "function" ? + anyJson() : + fail("The provided argument as ".concat(propDescription, " should be of type function, provided: ").concat(typeof providedType)); + }; + var glue42NotificationClickHandlerDecoder = object({ + action: nonEmptyStringDecoder, + handler: anyJson().andThen(function (result) { return functionCheck(result, "handler"); }) + }); + var webWorkerConfigDecoder = object({ + platform: optional(object({ + url: optional(nonEmptyStringDecoder), + openIfMissing: optional(boolean()) + })), + notifications: optional(object({ + defaultClick: optional(anyJson().andThen(function (result) { return functionCheck(result, "defaultClick"); })), + actionClicks: optional(array(glue42NotificationClickHandlerDecoder)) + })) + }); + + let nanoid = (size = 21) => + crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => { + byte &= 63; + if (byte < 36) { + id += byte.toString(36); + } else if (byte < 62) { + id += (byte - 26).toString(36).toUpperCase(); + } else if (byte > 62) { + id += '-'; + } else { + id += '_'; + } + return id + }, ''); + + const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c); + + let idbProxyableTypes; + let cursorAdvanceMethods; + // This is a function to prevent it throwing up in node environments. + function getIdbProxyableTypes() { + return (idbProxyableTypes || + (idbProxyableTypes = [ + IDBDatabase, + IDBObjectStore, + IDBIndex, + IDBCursor, + IDBTransaction, + ])); + } + // This is a function to prevent it throwing up in node environments. + function getCursorAdvanceMethods() { + return (cursorAdvanceMethods || + (cursorAdvanceMethods = [ + IDBCursor.prototype.advance, + IDBCursor.prototype.continue, + IDBCursor.prototype.continuePrimaryKey, + ])); + } + const cursorRequestMap = new WeakMap(); + const transactionDoneMap = new WeakMap(); + const transactionStoreNamesMap = new WeakMap(); + const transformCache = new WeakMap(); + const reverseTransformCache = new WeakMap(); + function promisifyRequest(request) { + const promise = new Promise((resolve, reject) => { + const unlisten = () => { + request.removeEventListener('success', success); + request.removeEventListener('error', error); + }; + const success = () => { + resolve(wrap(request.result)); + unlisten(); + }; + const error = () => { + reject(request.error); + unlisten(); + }; + request.addEventListener('success', success); + request.addEventListener('error', error); + }); + promise + .then((value) => { + // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval + // (see wrapFunction). + if (value instanceof IDBCursor) { + cursorRequestMap.set(value, request); + } + // Catching to avoid "Uncaught Promise exceptions" + }) + .catch(() => { }); + // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This + // is because we create many promises from a single IDBRequest. + reverseTransformCache.set(promise, request); + return promise; + } + function cacheDonePromiseForTransaction(tx) { + // Early bail if we've already created a done promise for this transaction. + if (transactionDoneMap.has(tx)) + return; + const done = new Promise((resolve, reject) => { + const unlisten = () => { + tx.removeEventListener('complete', complete); + tx.removeEventListener('error', error); + tx.removeEventListener('abort', error); + }; + const complete = () => { + resolve(); + unlisten(); + }; + const error = () => { + reject(tx.error || new DOMException('AbortError', 'AbortError')); + unlisten(); + }; + tx.addEventListener('complete', complete); + tx.addEventListener('error', error); + tx.addEventListener('abort', error); + }); + // Cache it for later retrieval. + transactionDoneMap.set(tx, done); + } + let idbProxyTraps = { + get(target, prop, receiver) { + if (target instanceof IDBTransaction) { + // Special handling for transaction.done. + if (prop === 'done') + return transactionDoneMap.get(target); + // Polyfill for objectStoreNames because of Edge. + if (prop === 'objectStoreNames') { + return target.objectStoreNames || transactionStoreNamesMap.get(target); + } + // Make tx.store return the only store in the transaction, or undefined if there are many. + if (prop === 'store') { + return receiver.objectStoreNames[1] + ? undefined + : receiver.objectStore(receiver.objectStoreNames[0]); + } + } + // Else transform whatever we get back. + return wrap(target[prop]); + }, + set(target, prop, value) { + target[prop] = value; + return true; + }, + has(target, prop) { + if (target instanceof IDBTransaction && + (prop === 'done' || prop === 'store')) { + return true; + } + return prop in target; + }, + }; + function replaceTraps(callback) { + idbProxyTraps = callback(idbProxyTraps); + } + function wrapFunction(func) { + // Due to expected object equality (which is enforced by the caching in `wrap`), we + // only create one new func per func. + // Edge doesn't support objectStoreNames (booo), so we polyfill it here. + if (func === IDBDatabase.prototype.transaction && + !('objectStoreNames' in IDBTransaction.prototype)) { + return function (storeNames, ...args) { + const tx = func.call(unwrap(this), storeNames, ...args); + transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]); + return wrap(tx); + }; + } + // Cursor methods are special, as the behaviour is a little more different to standard IDB. In + // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the + // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense + // with real promises, so each advance methods returns a new promise for the cursor object, or + // undefined if the end of the cursor has been reached. + if (getCursorAdvanceMethods().includes(func)) { + return function (...args) { + // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use + // the original object. + func.apply(unwrap(this), args); + return wrap(cursorRequestMap.get(this)); + }; + } + return function (...args) { + // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use + // the original object. + return wrap(func.apply(unwrap(this), args)); + }; + } + function transformCachableValue(value) { + if (typeof value === 'function') + return wrapFunction(value); + // This doesn't return, it just creates a 'done' promise for the transaction, + // which is later returned for transaction.done (see idbObjectHandler). + if (value instanceof IDBTransaction) + cacheDonePromiseForTransaction(value); + if (instanceOfAny(value, getIdbProxyableTypes())) + return new Proxy(value, idbProxyTraps); + // Return the same value back if we're not going to transform it. + return value; + } + function wrap(value) { + // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because + // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached. + if (value instanceof IDBRequest) + return promisifyRequest(value); + // If we've already transformed this value before, reuse the transformed value. + // This is faster, but it also provides object equality. + if (transformCache.has(value)) + return transformCache.get(value); + const newValue = transformCachableValue(value); + // Not all types are transformed. + // These may be primitive types, so they can't be WeakMap keys. + if (newValue !== value) { + transformCache.set(value, newValue); + reverseTransformCache.set(newValue, value); + } + return newValue; + } + const unwrap = (value) => reverseTransformCache.get(value); + + /** + * Open a database. + * + * @param name Name of the database. + * @param version Schema version. + * @param callbacks Additional callbacks. + */ + function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) { + const request = indexedDB.open(name, version); + const openPromise = wrap(request); + if (upgrade) { + request.addEventListener('upgradeneeded', (event) => { + upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event); + }); + } + if (blocked) { + request.addEventListener('blocked', (event) => blocked( + // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405 + event.oldVersion, event.newVersion, event)); + } + openPromise + .then((db) => { + if (terminated) + db.addEventListener('close', () => terminated()); + if (blocking) { + db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event)); + } + }) + .catch(() => { }); + return openPromise; + } + + const readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count']; + const writeMethods = ['put', 'add', 'delete', 'clear']; + const cachedMethods = new Map(); + function getMethod(target, prop) { + if (!(target instanceof IDBDatabase && + !(prop in target) && + typeof prop === 'string')) { + return; + } + if (cachedMethods.get(prop)) + return cachedMethods.get(prop); + const targetFuncName = prop.replace(/FromIndex$/, ''); + const useIndex = prop !== targetFuncName; + const isWrite = writeMethods.includes(targetFuncName); + if ( + // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge. + !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || + !(isWrite || readMethods.includes(targetFuncName))) { + return; + } + const method = async function (storeName, ...args) { + // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :( + const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly'); + let target = tx.store; + if (useIndex) + target = target.index(args.shift()); + // Must reject if op rejects. + // If it's a write operation, must reject if tx.done rejects. + // Must reject with op rejection first. + // Must resolve with op value. + // Must handle both promises (no unhandled rejections) + return (await Promise.all([ + target[targetFuncName](...args), + isWrite && tx.done, + ]))[0]; + }; + cachedMethods.set(prop, method); + return method; + } + replaceTraps((oldTraps) => ({ + ...oldTraps, + get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver), + has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop), + })); + + var openDbPromise; + var trimUrlQueryHashAndTrailingSlash = function (url) { + var trimmedQueryHash = url.split("?")[0].split("#")[0]; + var trimmedTrailingSlash = trimmedQueryHash.replace(/\/$/, ""); + return trimmedTrailingSlash; + }; + var startDb = function () { + if (openDbPromise) { + return openDbPromise; + } + openDbPromise = openDB(dbName, dbVersion, { + upgrade: function (db) { + if (!db.objectStoreNames.contains("workspaceLayouts")) { + db.createObjectStore("workspaceLayouts"); + } + if (!db.objectStoreNames.contains("globalLayouts")) { + db.createObjectStore("globalLayouts"); + } + if (!db.objectStoreNames.contains("serviceWorker")) { + db.createObjectStore("serviceWorker"); + } + } + }); + return openDbPromise; + }; + var checkPlatformOpen = function () { + var checkPromise = new Promise(function (resolve) { + var channel = new BroadcastChannel(serviceWorkerBroadcastChannelName); + var existenceHandler = function (event) { + var data = event.data; + // check to see if somehow I have reference to the client that answers + if (data.pong) { + channel.removeEventListener("message", existenceHandler); + resolve(true); + } + }; + channel.addEventListener("message", existenceHandler); + channel.postMessage({ messageType: "ping" }); + }); + var timeoutPromise = new Promise(function (resolve) { return setTimeout(function () { return resolve(false); }, platformPingTimeoutMS); }); + return Promise.race([checkPromise, timeoutPromise]); + }; + var getPlatformUrl = function (config) { return __awaiter(void 0, void 0, void 0, function () { + var url_1, db, workerData, url; + var _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + if ((_a = config.platform) === null || _a === void 0 ? void 0 : _a.url) { + url_1 = config.platform.url.split("?")[0].split("#")[0]; + console.debug("getting url from config: ".concat(url_1)); + return [2 /*return*/, trimUrlQueryHashAndTrailingSlash(url_1)]; + } + console.debug("starting the db"); + return [4 /*yield*/, startDb()]; + case 1: + db = _c.sent(); + if (!db.objectStoreNames.contains("serviceWorker")) { + console.warn("there is no service worker store"); + return [2 /*return*/]; + } + return [4 /*yield*/, db.get("serviceWorker", "workerData")]; + case 2: + workerData = _c.sent(); + url = (_b = workerData === null || workerData === void 0 ? void 0 : workerData.platformUrl) === null || _b === void 0 ? void 0 : _b.split("?")[0].split("#")[0]; + return [2 /*return*/, trimUrlQueryHashAndTrailingSlash(url)]; + } + }); + }); }; + var validateConfig = function (config) { + var _a; + if (config === void 0) { config = {}; } + var validated = webWorkerConfigDecoder.runWithException(config); + if ((_a = validated.platform) === null || _a === void 0 ? void 0 : _a.url) { + validated.platform.url = validated.platform.url.replace(/\/$/, ""); + } + return validated; + }; + var raiseIONotification = function (settings) { return __awaiter(void 0, void 0, void 0, function () { + var options, glueData; + var _a; + return __generator(this, function (_b) { + options = Object.assign({}, settings, { title: undefined, clickInterop: undefined, actions: undefined }); + options.actions = (_a = settings.actions) === null || _a === void 0 ? void 0 : _a.map(function (action) { + return { + action: action.action, + title: action.title, + icon: action.icon + }; + }); + glueData = { + clickInterop: settings.clickInterop, + actions: settings.actions, + id: nanoid() + }; + if (options.data) { + options.data.glueData = glueData; + } + else { + options.data = { glueData: glueData }; + } + return [2 /*return*/, self.registration.showNotification(settings.title, options)]; + }); + }); }; + var openBrowserPlatform = function (url) { + return new Promise(function (resolve, reject) { + if (!url) { + return reject("Cannot open the platform, because a url was not provided"); + } + var channel = new BroadcastChannel(serviceWorkerBroadcastChannelName); + var openHandler = function (event) { + var data = event.data; + if (data.platformStarted) { + channel.removeEventListener("message", openHandler); + resolve(); + } + }; + channel.addEventListener("message", openHandler); + self.clients.openWindow(url)["catch"](reject); + setTimeout(function () { return reject("Timed out waiting for the platform to open and send a ready signal: ".concat(platformOpenTimeoutMS, " MS")); }, platformOpenTimeoutMS); + }); + }; + var focusCorePlatform = function (url) { return __awaiter(void 0, void 0, void 0, function () { + var allWindows, _i, allWindows_1, client, urlStrippedQueryHash, urlStrippedTrailingSlash; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!url) { + console.warn("Cannot open the platform, because a url was not provided"); + return [2 /*return*/]; + } + return [4 /*yield*/, self.clients.matchAll({ type: "window" })]; + case 1: + allWindows = _a.sent(); + _i = 0, allWindows_1 = allWindows; + _a.label = 2; + case 2: + if (!(_i < allWindows_1.length)) return [3 /*break*/, 5]; + client = allWindows_1[_i]; + urlStrippedQueryHash = client.url.split("?")[0].split("#")[0]; + urlStrippedTrailingSlash = urlStrippedQueryHash.replace(/\/$/, ""); + if (!(urlStrippedTrailingSlash === url)) return [3 /*break*/, 4]; + return [4 /*yield*/, client.focus()]; + case 3: + _a.sent(); + return [2 /*return*/]; + case 4: + _i++; + return [3 /*break*/, 2]; + case 5: return [2 /*return*/]; + } + }); + }); }; + var setupCore = function (config) { + var verifiedConfig = validateConfig(config); + self.addEventListener("notificationclick", function (event) { + var isPlatformOpen; + var channel = new BroadcastChannel(serviceWorkerBroadcastChannelName); + console.debug("Received a notification, checking if the platform is open"); + var executionPromise = checkPlatformOpen() + .then(function (platformExists) { + var _a, _b, _c; + isPlatformOpen = platformExists; + console.debug("The platform is: ".concat(isPlatformOpen ? "open" : "not open")); + var action = event.action; + if (!action && ((_a = verifiedConfig.notifications) === null || _a === void 0 ? void 0 : _a.defaultClick)) { + console.debug("Calling a defined default click handler"); + return verifiedConfig.notifications.defaultClick(event, isPlatformOpen); + } + if (action && ((_c = (_b = verifiedConfig.notifications) === null || _b === void 0 ? void 0 : _b.actionClicks) === null || _c === void 0 ? void 0 : _c.some(function (actionDef) { return actionDef.action === action; }))) { + var foundHandler = verifiedConfig.notifications.actionClicks.find(function (actionDef) { return actionDef.action === action; }).handler; + console.debug("Calling a defined action click handler for action: ".concat(action)); + return foundHandler(event, isPlatformOpen); + } + }) + .then(function () { + console.debug("Getting the platform url"); + return getPlatformUrl(verifiedConfig); + }) + .then(function (url) { + var _a, _b, _c; + console.debug("Found platform url: ".concat(url)); + if (!isPlatformOpen && ((_a = verifiedConfig.platform) === null || _a === void 0 ? void 0 : _a.openIfMissing)) { + console.debug("Opening the platform"); + return openBrowserPlatform(url); + } + var focusOnClick = (_c = (_b = event.notification.data) === null || _b === void 0 ? void 0 : _b.glueData) === null || _c === void 0 ? void 0 : _c.focusPlatformOnDefaultClick; + if (isPlatformOpen && focusOnClick) { + console.debug("Focusing the platform"); + return focusCorePlatform(url); + } + }) + .then(function () { + var messageType = "notificationClick"; + var action = event.action; + var glueData = event.notification.data.glueData; + var definition = { + badge: event.notification.badge, + body: event.notification.body, + data: event.notification.data, + dir: event.notification.dir, + icon: event.notification.icon, + image: event.notification.image, + lang: event.notification.lang, + renotify: event.notification.renotify, + requireInteraction: event.notification.requireInteraction, + silent: event.notification.silent, + tag: event.notification.tag, + timestamp: event.notification.timestamp, + vibrate: event.notification.vibrate + }; + channel.postMessage({ messageType: messageType, action: action, glueData: glueData, definition: definition }); + })["catch"](function (error) { + var stringError = typeof error === "string" ? error : JSON.stringify(error.message); + channel.postMessage({ messageType: "notificationError", error: stringError }); + }); + event.waitUntil(executionPromise); + }); + self.addEventListener("notificationclose", function (event) { + var channel = new BroadcastChannel(serviceWorkerBroadcastChannelName); + console.debug("Received a notification close event, checking if the platform is open"); + var executionPromise = checkPlatformOpen() + .then(function (platformExists) { + console.debug("The platform is: ".concat(platformExists ? "open" : "not open")); + if (!platformExists) { + console.log("The platform is not opened and will not open it for a notification close event"); + return; + } + var messageType = "notificationClose"; + var action = event.action; + var glueData = event.notification.data.glueData; + var definition = { + badge: event.notification.badge, + body: event.notification.body, + data: event.notification.data, + dir: event.notification.dir, + icon: event.notification.icon, + image: event.notification.image, + lang: event.notification.lang, + renotify: event.notification.renotify, + requireInteraction: event.notification.requireInteraction, + silent: event.notification.silent, + tag: event.notification.tag, + timestamp: event.notification.timestamp, + vibrate: event.notification.vibrate + }; + channel.postMessage({ messageType: messageType, action: action, glueData: glueData, definition: definition }); + })["catch"](function (error) { + var stringError = typeof error === "string" ? error : JSON.stringify(error.message); + channel.postMessage({ messageType: "notificationError", error: stringError }); + }); + event.waitUntil(executionPromise); + }); + }; + + /* eslint-disable @typescript-eslint/no-explicit-any */ + if (typeof self !== "undefined") { + self.IOWorker = setupCore; + self.openBrowserPlatform = openBrowserPlatform; + self.raiseIONotification = raiseIONotification; + } + + exports.default = setupCore; + exports.openBrowserPlatform = openBrowserPlatform; + exports.raiseIONotification = raiseIONotification; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=web.worker.umd.js.map diff --git a/browser-platform-home-react-wsp/public/web.worker.umd.js.map b/browser-platform-home-react-wsp/public/web.worker.umd.js.map new file mode 100644 index 0000000..e340a72 --- /dev/null +++ b/browser-platform-home-react-wsp/public/web.worker.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"web.worker.umd.js","sources":["../node_modules/tslib/tslib.es6.js","../src/constants.ts","../node_modules/decoder-validate/dist/index.es5.js","../src/decoders.ts","../node_modules/nanoid/index.browser.js","../node_modules/idb/build/wrap-idb-value.js","../node_modules/idb/build/index.js","../src/worker.ts","../src/index.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","export const serviceWorkerBroadcastChannelName = \"glue42-core-worker\";\nexport const platformPingTimeoutMS = 3000;\nexport const platformOpenTimeoutMS = 60000;\n\nexport const dbName = \"glue42core\";\n\nexport const dbVersion = 2;","/**\r\n * Wraps values in an `Ok` type.\r\n *\r\n * Example: `ok(5) // => {ok: true, result: 5}`\r\n */\r\nvar ok = function (result) { return ({ ok: true, result: result }); };\r\n/**\r\n * Typeguard for `Ok`.\r\n */\r\nvar isOk = function (r) { return r.ok === true; };\r\n/**\r\n * Wraps errors in an `Err` type.\r\n *\r\n * Example: `err('on fire') // => {ok: false, error: 'on fire'}`\r\n */\r\nvar err = function (error) { return ({ ok: false, error: error }); };\r\n/**\r\n * Typeguard for `Err`.\r\n */\r\nvar isErr = function (r) { return r.ok === false; };\r\n/**\r\n * Create a `Promise` that either resolves with the result of `Ok` or rejects\r\n * with the error of `Err`.\r\n */\r\nvar asPromise = function (r) {\r\n return r.ok === true ? Promise.resolve(r.result) : Promise.reject(r.error);\r\n};\r\n/**\r\n * Unwraps a `Result` and returns either the result of an `Ok`, or\r\n * `defaultValue`.\r\n *\r\n * Example:\r\n * ```\r\n * Result.withDefault(5, number().run(json))\r\n * ```\r\n *\r\n * It would be nice if `Decoder` had an instance method that mirrored this\r\n * function. Such a method would look something like this:\r\n * ```\r\n * class Decoder {\r\n * runWithDefault = (defaultValue: A, json: any): A =>\r\n * Result.withDefault(defaultValue, this.run(json));\r\n * }\r\n *\r\n * number().runWithDefault(5, json)\r\n * ```\r\n * Unfortunately, the type of `defaultValue: A` on the method causes issues\r\n * with type inference on the `object` decoder in some situations. While these\r\n * inference issues can be solved by providing the optional type argument for\r\n * `object`s, the extra trouble and confusion doesn't seem worth it.\r\n */\r\nvar withDefault = function (defaultValue, r) {\r\n return r.ok === true ? r.result : defaultValue;\r\n};\r\n/**\r\n * Return the successful result, or throw an error.\r\n */\r\nvar withException = function (r) {\r\n if (r.ok === true) {\r\n return r.result;\r\n }\r\n else {\r\n throw r.error;\r\n }\r\n};\r\n/**\r\n * Given an array of `Result`s, return the successful values.\r\n */\r\nvar successes = function (results) {\r\n return results.reduce(function (acc, r) { return (r.ok === true ? acc.concat(r.result) : acc); }, []);\r\n};\r\n/**\r\n * Apply `f` to the result of an `Ok`, or pass the error through.\r\n */\r\nvar map = function (f, r) {\r\n return r.ok === true ? ok(f(r.result)) : r;\r\n};\r\n/**\r\n * Apply `f` to the result of two `Ok`s, or pass an error through. If both\r\n * `Result`s are errors then the first one is returned.\r\n */\r\nvar map2 = function (f, ar, br) {\r\n return ar.ok === false ? ar :\r\n br.ok === false ? br :\r\n ok(f(ar.result, br.result));\r\n};\r\n/**\r\n * Apply `f` to the error of an `Err`, or pass the success through.\r\n */\r\nvar mapError = function (f, r) {\r\n return r.ok === true ? r : err(f(r.error));\r\n};\r\n/**\r\n * Chain together a sequence of computations that may fail, similar to a\r\n * `Promise`. If the first computation fails then the error will propagate\r\n * through. If it succeeds, then `f` will be applied to the value, returning a\r\n * new `Result`.\r\n */\r\nvar andThen = function (f, r) {\r\n return r.ok === true ? f(r.result) : r;\r\n};\r\n\r\n\r\nvar result = Object.freeze({\r\n\tok: ok,\r\n\tisOk: isOk,\r\n\terr: err,\r\n\tisErr: isErr,\r\n\tasPromise: asPromise,\r\n\twithDefault: withDefault,\r\n\twithException: withException,\r\n\tsuccesses: successes,\r\n\tmap: map,\r\n\tmap2: map2,\r\n\tmapError: mapError,\r\n\tandThen: andThen\r\n});\r\n\r\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction isEqual(a, b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (a === null && b === null) {\r\n return true;\r\n }\r\n if (typeof (a) !== typeof (b)) {\r\n return false;\r\n }\r\n if (typeof (a) === 'object') {\r\n // Array\r\n if (Array.isArray(a)) {\r\n if (!Array.isArray(b)) {\r\n return false;\r\n }\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (var i = 0; i < a.length; i++) {\r\n if (!isEqual(a[i], b[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n // Hash table\r\n var keys = Object.keys(a);\r\n if (keys.length !== Object.keys(b).length) {\r\n return false;\r\n }\r\n for (var i = 0; i < keys.length; i++) {\r\n if (!b.hasOwnProperty(keys[i])) {\r\n return false;\r\n }\r\n if (!isEqual(a[keys[i]], b[keys[i]])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n}\r\n/**\r\n * Type guard for `DecoderError`. One use case of the type guard is in the\r\n * `catch` of a promise. Typescript types the error argument of `catch` as\r\n * `any`, so when dealing with a decoder as a promise you may need to\r\n * distinguish between a `DecoderError` and an error string.\r\n */\r\nvar isDecoderError = function (a) {\r\n return a.kind === 'DecoderError' && typeof a.at === 'string' && typeof a.message === 'string';\r\n};\r\n/*\r\n * Helpers\r\n */\r\nvar isJsonArray = function (json) { return Array.isArray(json); };\r\nvar isJsonObject = function (json) {\r\n return typeof json === 'object' && json !== null && !isJsonArray(json);\r\n};\r\nvar typeString = function (json) {\r\n switch (typeof json) {\r\n case 'string':\r\n return 'a string';\r\n case 'number':\r\n return 'a number';\r\n case 'boolean':\r\n return 'a boolean';\r\n case 'undefined':\r\n return 'undefined';\r\n case 'object':\r\n if (json instanceof Array) {\r\n return 'an array';\r\n }\r\n else if (json === null) {\r\n return 'null';\r\n }\r\n else {\r\n return 'an object';\r\n }\r\n default:\r\n return JSON.stringify(json);\r\n }\r\n};\r\nvar expectedGot = function (expected, got) {\r\n return \"expected \" + expected + \", got \" + typeString(got);\r\n};\r\nvar printPath = function (paths) {\r\n return paths.map(function (path) { return (typeof path === 'string' ? \".\" + path : \"[\" + path + \"]\"); }).join('');\r\n};\r\nvar prependAt = function (newAt, _a) {\r\n var at = _a.at, rest = __rest(_a, [\"at\"]);\r\n return (__assign({ at: newAt + (at || '') }, rest));\r\n};\r\n/**\r\n * Decoders transform json objects with unknown structure into known and\r\n * verified forms. You can create objects of type `Decoder` with either the\r\n * primitive decoder functions, such as `boolean()` and `string()`, or by\r\n * applying higher-order decoders to the primitives, such as `array(boolean())`\r\n * or `dict(string())`.\r\n *\r\n * Each of the decoder functions are available both as a static method on\r\n * `Decoder` and as a function alias -- for example the string decoder is\r\n * defined at `Decoder.string()`, but is also aliased to `string()`. Using the\r\n * function aliases exported with the library is recommended.\r\n *\r\n * `Decoder` exposes a number of 'run' methods, which all decode json in the\r\n * same way, but communicate success and failure in different ways. The `map`\r\n * and `andThen` methods modify decoders without having to call a 'run' method.\r\n *\r\n * Alternatively, the main decoder `run()` method returns an object of type\r\n * `Result`. This library provides a number of helper\r\n * functions for dealing with the `Result` type, so you can do all the same\r\n * things with a `Result` as with the decoder methods.\r\n */\r\nvar Decoder = /** @class */ (function () {\r\n /**\r\n * The Decoder class constructor is kept private to separate the internal\r\n * `decode` function from the external `run` function. The distinction\r\n * between the two functions is that `decode` returns a\r\n * `Partial` on failure, which contains an unfinished error\r\n * report. When `run` is called on a decoder, the relevant series of `decode`\r\n * calls is made, and then on failure the resulting `Partial`\r\n * is turned into a `DecoderError` by filling in the missing information.\r\n *\r\n * While hiding the constructor may seem restrictive, leveraging the\r\n * provided decoder combinators and helper functions such as\r\n * `andThen` and `map` should be enough to build specialized decoders as\r\n * needed.\r\n */\r\n function Decoder(decode) {\r\n var _this = this;\r\n this.decode = decode;\r\n /**\r\n * Run the decoder and return a `Result` with either the decoded value or a\r\n * `DecoderError` containing the json input, the location of the error, and\r\n * the error message.\r\n *\r\n * Examples:\r\n * ```\r\n * number().run(12)\r\n * // => {ok: true, result: 12}\r\n *\r\n * string().run(9001)\r\n * // =>\r\n * // {\r\n * // ok: false,\r\n * // error: {\r\n * // kind: 'DecoderError',\r\n * // input: 9001,\r\n * // at: 'input',\r\n * // message: 'expected a string, got 9001'\r\n * // }\r\n * // }\r\n * ```\r\n */\r\n this.run = function (json) {\r\n return mapError(function (error) { return ({\r\n kind: 'DecoderError',\r\n input: json,\r\n at: 'input' + (error.at || ''),\r\n message: error.message || ''\r\n }); }, _this.decode(json));\r\n };\r\n /**\r\n * Run the decoder as a `Promise`.\r\n */\r\n this.runPromise = function (json) { return asPromise(_this.run(json)); };\r\n /**\r\n * Run the decoder and return the value on success, or throw an exception\r\n * with a formatted error string.\r\n */\r\n this.runWithException = function (json) { return withException(_this.run(json)); };\r\n /**\r\n * Construct a new decoder that applies a transformation to the decoded\r\n * result. If the decoder succeeds then `f` will be applied to the value. If\r\n * it fails the error will propagated through.\r\n *\r\n * Example:\r\n * ```\r\n * number().map(x => x * 5).run(10)\r\n * // => {ok: true, result: 50}\r\n * ```\r\n */\r\n this.map = function (f) {\r\n return new Decoder(function (json) { return map(f, _this.decode(json)); });\r\n };\r\n /**\r\n * Chain together a sequence of decoders. The first decoder will run, and\r\n * then the function will determine what decoder to run second. If the result\r\n * of the first decoder succeeds then `f` will be applied to the decoded\r\n * value. If it fails the error will propagate through.\r\n *\r\n * This is a very powerful method -- it can act as both the `map` and `where`\r\n * methods, can improve error messages for edge cases, and can be used to\r\n * make a decoder for custom types.\r\n *\r\n * Example of adding an error message:\r\n * ```\r\n * const versionDecoder = valueAt(['version'], number());\r\n * const infoDecoder3 = object({a: boolean()});\r\n *\r\n * const decoder = versionDecoder.andThen(version => {\r\n * switch (version) {\r\n * case 3:\r\n * return infoDecoder3;\r\n * default:\r\n * return fail(`Unable to decode info, version ${version} is not supported.`);\r\n * }\r\n * });\r\n *\r\n * decoder.run({version: 3, a: true})\r\n * // => {ok: true, result: {a: true}}\r\n *\r\n * decoder.run({version: 5, x: 'abc'})\r\n * // =>\r\n * // {\r\n * // ok: false,\r\n * // error: {... message: 'Unable to decode info, version 5 is not supported.'}\r\n * // }\r\n * ```\r\n *\r\n * Example of decoding a custom type:\r\n * ```\r\n * // nominal type for arrays with a length of at least one\r\n * type NonEmptyArray = T[] & { __nonEmptyArrayBrand__: void };\r\n *\r\n * const nonEmptyArrayDecoder = (values: Decoder): Decoder> =>\r\n * array(values).andThen(arr =>\r\n * arr.length > 0\r\n * ? succeed(createNonEmptyArray(arr))\r\n * : fail(`expected a non-empty array, got an empty array`)\r\n * );\r\n * ```\r\n */\r\n this.andThen = function (f) {\r\n return new Decoder(function (json) {\r\n return andThen(function (value) { return f(value).decode(json); }, _this.decode(json));\r\n });\r\n };\r\n /**\r\n * Add constraints to a decoder _without_ changing the resulting type. The\r\n * `test` argument is a predicate function which returns true for valid\r\n * inputs. When `test` fails on an input, the decoder fails with the given\r\n * `errorMessage`.\r\n *\r\n * ```\r\n * const chars = (length: number): Decoder =>\r\n * string().where(\r\n * (s: string) => s.length === length,\r\n * `expected a string of length ${length}`\r\n * );\r\n *\r\n * chars(5).run('12345')\r\n * // => {ok: true, result: '12345'}\r\n *\r\n * chars(2).run('HELLO')\r\n * // => {ok: false, error: {... message: 'expected a string of length 2'}}\r\n *\r\n * chars(12).run(true)\r\n * // => {ok: false, error: {... message: 'expected a string, got a boolean'}}\r\n * ```\r\n */\r\n this.where = function (test, errorMessage) {\r\n return _this.andThen(function (value) { return (test(value) ? Decoder.succeed(value) : Decoder.fail(errorMessage)); });\r\n };\r\n }\r\n /**\r\n * Decoder primitive that validates strings, and fails on all other input.\r\n */\r\n Decoder.string = function () {\r\n return new Decoder(function (json) {\r\n return typeof json === 'string'\r\n ? ok(json)\r\n : err({ message: expectedGot('a string', json) });\r\n });\r\n };\r\n /**\r\n * Decoder primitive that validates numbers, and fails on all other input.\r\n */\r\n Decoder.number = function () {\r\n return new Decoder(function (json) {\r\n return typeof json === 'number'\r\n ? ok(json)\r\n : err({ message: expectedGot('a number', json) });\r\n });\r\n };\r\n /**\r\n * Decoder primitive that validates booleans, and fails on all other input.\r\n */\r\n Decoder.boolean = function () {\r\n return new Decoder(function (json) {\r\n return typeof json === 'boolean'\r\n ? ok(json)\r\n : err({ message: expectedGot('a boolean', json) });\r\n });\r\n };\r\n Decoder.constant = function (value) {\r\n return new Decoder(function (json) {\r\n return isEqual(json, value)\r\n ? ok(value)\r\n : err({ message: \"expected \" + JSON.stringify(value) + \", got \" + JSON.stringify(json) });\r\n });\r\n };\r\n Decoder.object = function (decoders) {\r\n return new Decoder(function (json) {\r\n if (isJsonObject(json) && decoders) {\r\n var obj = {};\r\n for (var key in decoders) {\r\n if (decoders.hasOwnProperty(key)) {\r\n var r = decoders[key].decode(json[key]);\r\n if (r.ok === true) {\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (r.result !== undefined) {\r\n obj[key] = r.result;\r\n }\r\n }\r\n else if (json[key] === undefined) {\r\n return err({ message: \"the key '\" + key + \"' is required but was not present\" });\r\n }\r\n else {\r\n return err(prependAt(\".\" + key, r.error));\r\n }\r\n }\r\n }\r\n return ok(obj);\r\n }\r\n else if (isJsonObject(json)) {\r\n return ok(json);\r\n }\r\n else {\r\n return err({ message: expectedGot('an object', json) });\r\n }\r\n });\r\n };\r\n Decoder.array = function (decoder) {\r\n return new Decoder(function (json) {\r\n if (isJsonArray(json) && decoder) {\r\n var decodeValue_1 = function (v, i) {\r\n return mapError(function (err$$1) { return prependAt(\"[\" + i + \"]\", err$$1); }, decoder.decode(v));\r\n };\r\n return json.reduce(function (acc, v, i) {\r\n return map2(function (arr, result) { return arr.concat([result]); }, acc, decodeValue_1(v, i));\r\n }, ok([]));\r\n }\r\n else if (isJsonArray(json)) {\r\n return ok(json);\r\n }\r\n else {\r\n return err({ message: expectedGot('an array', json) });\r\n }\r\n });\r\n };\r\n Decoder.tuple = function (decoders) {\r\n return new Decoder(function (json) {\r\n if (isJsonArray(json)) {\r\n if (json.length !== decoders.length) {\r\n return err({\r\n message: \"expected a tuple of length \" + decoders.length + \", got one of length \" + json.length\r\n });\r\n }\r\n var result = [];\r\n for (var i = 0; i < decoders.length; i++) {\r\n var nth = decoders[i].decode(json[i]);\r\n if (nth.ok) {\r\n result[i] = nth.result;\r\n }\r\n else {\r\n return err(prependAt(\"[\" + i + \"]\", nth.error));\r\n }\r\n }\r\n return ok(result);\r\n }\r\n else {\r\n return err({ message: expectedGot(\"a tuple of length \" + decoders.length, json) });\r\n }\r\n });\r\n };\r\n Decoder.union = function (ad, bd) {\r\n var decoders = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n decoders[_i - 2] = arguments[_i];\r\n }\r\n return Decoder.oneOf.apply(Decoder, [ad, bd].concat(decoders));\r\n };\r\n Decoder.intersection = function (ad, bd) {\r\n var ds = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n ds[_i - 2] = arguments[_i];\r\n }\r\n return new Decoder(function (json) {\r\n return [ad, bd].concat(ds).reduce(function (acc, decoder) { return map2(Object.assign, acc, decoder.decode(json)); }, ok({}));\r\n });\r\n };\r\n /**\r\n * Escape hatch to bypass validation. Always succeeds and types the result as\r\n * `any`. Useful for defining decoders incrementally, particularly for\r\n * complex objects.\r\n *\r\n * Example:\r\n * ```\r\n * interface User {\r\n * name: string;\r\n * complexUserData: ComplexType;\r\n * }\r\n *\r\n * const userDecoder: Decoder = object({\r\n * name: string(),\r\n * complexUserData: anyJson()\r\n * });\r\n * ```\r\n */\r\n Decoder.anyJson = function () { return new Decoder(function (json) { return ok(json); }); };\r\n /**\r\n * Decoder identity function which always succeeds and types the result as\r\n * `unknown`.\r\n */\r\n Decoder.unknownJson = function () {\r\n return new Decoder(function (json) { return ok(json); });\r\n };\r\n /**\r\n * Decoder for json objects where the keys are unknown strings, but the values\r\n * should all be of the same type.\r\n *\r\n * Example:\r\n * ```\r\n * dict(number()).run({chocolate: 12, vanilla: 10, mint: 37});\r\n * // => {ok: true, result: {chocolate: 12, vanilla: 10, mint: 37}}\r\n * ```\r\n */\r\n Decoder.dict = function (decoder) {\r\n return new Decoder(function (json) {\r\n if (isJsonObject(json)) {\r\n var obj = {};\r\n for (var key in json) {\r\n if (json.hasOwnProperty(key)) {\r\n var r = decoder.decode(json[key]);\r\n if (r.ok === true) {\r\n obj[key] = r.result;\r\n }\r\n else {\r\n return err(prependAt(\".\" + key, r.error));\r\n }\r\n }\r\n }\r\n return ok(obj);\r\n }\r\n else {\r\n return err({ message: expectedGot('an object', json) });\r\n }\r\n });\r\n };\r\n /**\r\n * Decoder for values that may be `undefined`. This is primarily helpful for\r\n * decoding interfaces with optional fields.\r\n *\r\n * Example:\r\n * ```\r\n * interface User {\r\n * id: number;\r\n * isOwner?: boolean;\r\n * }\r\n *\r\n * const decoder: Decoder = object({\r\n * id: number(),\r\n * isOwner: optional(boolean())\r\n * });\r\n * ```\r\n */\r\n Decoder.optional = function (decoder) {\r\n return new Decoder(function (json) { return (json === undefined || json === null ? ok(undefined) : decoder.decode(json)); });\r\n };\r\n /**\r\n * Decoder that attempts to run each decoder in `decoders` and either succeeds\r\n * with the first successful decoder, or fails after all decoders have failed.\r\n *\r\n * Note that `oneOf` expects the decoders to all have the same return type,\r\n * while `union` creates a decoder for the union type of all the input\r\n * decoders.\r\n *\r\n * Examples:\r\n * ```\r\n * oneOf(string(), number().map(String))\r\n * oneOf(constant('start'), constant('stop'), succeed('unknown'))\r\n * ```\r\n */\r\n Decoder.oneOf = function () {\r\n var decoders = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n decoders[_i] = arguments[_i];\r\n }\r\n return new Decoder(function (json) {\r\n var errors = [];\r\n for (var i = 0; i < decoders.length; i++) {\r\n var r = decoders[i].decode(json);\r\n if (r.ok === true) {\r\n return r;\r\n }\r\n else {\r\n errors[i] = r.error;\r\n }\r\n }\r\n var errorsList = errors\r\n .map(function (error) { return \"at error\" + (error.at || '') + \": \" + error.message; })\r\n .join('\", \"');\r\n return err({\r\n message: \"expected a value matching one of the decoders, got the errors [\\\"\" + errorsList + \"\\\"]\"\r\n });\r\n });\r\n };\r\n /**\r\n * Decoder that always succeeds with either the decoded value, or a fallback\r\n * default value.\r\n */\r\n Decoder.withDefault = function (defaultValue, decoder) {\r\n return new Decoder(function (json) {\r\n return ok(withDefault(defaultValue, decoder.decode(json)));\r\n });\r\n };\r\n /**\r\n * Decoder that pulls a specific field out of a json structure, instead of\r\n * decoding and returning the full structure. The `paths` array describes the\r\n * object keys and array indices to traverse, so that values can be pulled out\r\n * of a nested structure.\r\n *\r\n * Example:\r\n * ```\r\n * const decoder = valueAt(['a', 'b', 0], string());\r\n *\r\n * decoder.run({a: {b: ['surprise!']}})\r\n * // => {ok: true, result: 'surprise!'}\r\n *\r\n * decoder.run({a: {x: 'cats'}})\r\n * // => {ok: false, error: {... at: 'input.a.b[0]' message: 'path does not exist'}}\r\n * ```\r\n *\r\n * Note that the `decoder` is ran on the value found at the last key in the\r\n * path, even if the last key is not found. This allows the `optional`\r\n * decoder to succeed when appropriate.\r\n * ```\r\n * const optionalDecoder = valueAt(['a', 'b', 'c'], optional(string()));\r\n *\r\n * optionalDecoder.run({a: {b: {c: 'surprise!'}}})\r\n * // => {ok: true, result: 'surprise!'}\r\n *\r\n * optionalDecoder.run({a: {b: 'cats'}})\r\n * // => {ok: false, error: {... at: 'input.a.b.c' message: 'expected an object, got \"cats\"'}\r\n *\r\n * optionalDecoder.run({a: {b: {z: 1}}})\r\n * // => {ok: true, result: undefined}\r\n * ```\r\n */\r\n Decoder.valueAt = function (paths, decoder) {\r\n return new Decoder(function (json) {\r\n var jsonAtPath = json;\r\n for (var i = 0; i < paths.length; i++) {\r\n if (jsonAtPath === undefined) {\r\n return err({\r\n at: printPath(paths.slice(0, i + 1)),\r\n message: 'path does not exist'\r\n });\r\n }\r\n else if (typeof paths[i] === 'string' && !isJsonObject(jsonAtPath)) {\r\n return err({\r\n at: printPath(paths.slice(0, i + 1)),\r\n message: expectedGot('an object', jsonAtPath)\r\n });\r\n }\r\n else if (typeof paths[i] === 'number' && !isJsonArray(jsonAtPath)) {\r\n return err({\r\n at: printPath(paths.slice(0, i + 1)),\r\n message: expectedGot('an array', jsonAtPath)\r\n });\r\n }\r\n else {\r\n jsonAtPath = jsonAtPath[paths[i]];\r\n }\r\n }\r\n return mapError(function (error) {\r\n return jsonAtPath === undefined\r\n ? { at: printPath(paths), message: 'path does not exist' }\r\n : prependAt(printPath(paths), error);\r\n }, decoder.decode(jsonAtPath));\r\n });\r\n };\r\n /**\r\n * Decoder that ignores the input json and always succeeds with `fixedValue`.\r\n */\r\n Decoder.succeed = function (fixedValue) {\r\n return new Decoder(function (json) { return ok(fixedValue); });\r\n };\r\n /**\r\n * Decoder that ignores the input json and always fails with `errorMessage`.\r\n */\r\n Decoder.fail = function (errorMessage) {\r\n return new Decoder(function (json) { return err({ message: errorMessage }); });\r\n };\r\n /**\r\n * Decoder that allows for validating recursive data structures. Unlike with\r\n * functions, decoders assigned to variables can't reference themselves\r\n * before they are fully defined. We can avoid prematurely referencing the\r\n * decoder by wrapping it in a function that won't be called until use, at\r\n * which point the decoder has been defined.\r\n *\r\n * Example:\r\n * ```\r\n * interface Comment {\r\n * msg: string;\r\n * replies: Comment[];\r\n * }\r\n *\r\n * const decoder: Decoder = object({\r\n * msg: string(),\r\n * replies: lazy(() => array(decoder))\r\n * });\r\n * ```\r\n */\r\n Decoder.lazy = function (mkDecoder) {\r\n return new Decoder(function (json) { return mkDecoder().decode(json); });\r\n };\r\n return Decoder;\r\n}());\r\n\r\n/* tslint:disable:variable-name */\r\n/** See `Decoder.string` */\r\nvar string = Decoder.string;\r\n/** See `Decoder.number` */\r\nvar number = Decoder.number;\r\n/** See `Decoder.boolean` */\r\nvar boolean = Decoder.boolean;\r\n/** See `Decoder.anyJson` */\r\nvar anyJson = Decoder.anyJson;\r\n/** See `Decoder.unknownJson` */\r\nvar unknownJson = Decoder.unknownJson;\r\n/** See `Decoder.constant` */\r\nvar constant = Decoder.constant;\r\n/** See `Decoder.object` */\r\nvar object = Decoder.object;\r\n/** See `Decoder.array` */\r\nvar array = Decoder.array;\r\n/** See `Decoder.tuple` */\r\nvar tuple = Decoder.tuple;\r\n/** See `Decoder.dict` */\r\nvar dict = Decoder.dict;\r\n/** See `Decoder.optional` */\r\nvar optional = Decoder.optional;\r\n/** See `Decoder.oneOf` */\r\nvar oneOf = Decoder.oneOf;\r\n/** See `Decoder.union` */\r\nvar union = Decoder.union;\r\n/** See `Decoder.intersection` */\r\nvar intersection = Decoder.intersection;\r\n/** See `Decoder.withDefault` */\r\nvar withDefault$1 = Decoder.withDefault;\r\n/** See `Decoder.valueAt` */\r\nvar valueAt = Decoder.valueAt;\r\n/** See `Decoder.succeed` */\r\nvar succeed = Decoder.succeed;\r\n/** See `Decoder.fail` */\r\nvar fail = Decoder.fail;\r\n/** See `Decoder.lazy` */\r\nvar lazy = Decoder.lazy;\r\n\r\nexport { result as Result, Decoder, isDecoderError, string, number, boolean, anyJson, unknownJson, constant, object, array, tuple, dict, optional, oneOf, union, intersection, withDefault$1 as withDefault, valueAt, succeed, fail, lazy };\r\n//# sourceMappingURL=index.es5.js.map\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { anyJson, array, boolean, Decoder, fail, object, optional, string } from \"decoder-validate\";\nimport { IOConnectNotificationClickHandler, WebWorkerConfig } from \"../web.worker\";\n\nexport const nonEmptyStringDecoder: Decoder = string().where((s) => s.length > 0, \"Expected a non-empty string\");\n\nconst functionCheck = (input: any, propDescription: string): Decoder => {\n const providedType = typeof input;\n\n return providedType === \"function\" ?\n anyJson() :\n fail(`The provided argument as ${propDescription} should be of type function, provided: ${typeof providedType}`);\n};\n\nexport const glue42NotificationClickHandlerDecoder: Decoder = object({\n action: nonEmptyStringDecoder,\n handler: anyJson().andThen((result) => functionCheck(result, \"handler\"))\n});\n\nexport const webWorkerConfigDecoder: Decoder = object({\n platform: optional(object({\n url: optional(nonEmptyStringDecoder),\n openIfMissing: optional(boolean())\n })),\n notifications: optional(object({\n defaultClick: optional(anyJson().andThen((result) => functionCheck(result, \"defaultClick\"))),\n actionClicks: optional(array(glue42NotificationClickHandlerDecoder))\n }))\n});\n","export { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nexport let nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { IOConnectWebWorkerFactoryFunction, WebWorkerConfig } from \"../web.worker\";\nimport { dbName, dbVersion, platformOpenTimeoutMS, platformPingTimeoutMS, serviceWorkerBroadcastChannelName } from \"./constants\";\nimport { webWorkerConfigDecoder } from \"./decoders\";\nimport { nanoid } from \"nanoid\";\nimport { IDBPDatabase, openDB } from \"idb\";\n\nlet openDbPromise: Promise>;\n\nconst trimUrlQueryHashAndTrailingSlash = (url: string): string => {\n const trimmedQueryHash = url.split(\"?\")[0].split(\"#\")[0];\n const trimmedTrailingSlash = trimmedQueryHash.replace(/\\/$/, \"\");\n\n return trimmedTrailingSlash;\n};\n\nconst startDb = (): Promise> => {\n if (openDbPromise) {\n return openDbPromise;\n }\n\n openDbPromise = openDB(dbName, dbVersion, {\n upgrade: (db: IDBPDatabase) => {\n if (!db.objectStoreNames.contains(\"workspaceLayouts\")) {\n db.createObjectStore(\"workspaceLayouts\");\n }\n\n if (!db.objectStoreNames.contains(\"globalLayouts\")) {\n db.createObjectStore(\"globalLayouts\");\n }\n\n if (!db.objectStoreNames.contains(\"serviceWorker\")) {\n db.createObjectStore(\"serviceWorker\");\n }\n }\n });\n\n return openDbPromise;\n};\n\nconst checkPlatformOpen = (): Promise => {\n const checkPromise = new Promise((resolve) => {\n const channel = new BroadcastChannel(serviceWorkerBroadcastChannelName);\n\n const existenceHandler = function (event: any): void {\n const data = event.data;\n // check to see if somehow I have reference to the client that answers\n if (data.pong) {\n channel.removeEventListener(\"message\", existenceHandler);\n resolve(true);\n }\n };\n\n channel.addEventListener(\"message\", existenceHandler);\n\n channel.postMessage({ messageType: \"ping\" });\n });\n\n const timeoutPromise = new Promise((resolve) => setTimeout(() => resolve(false), platformPingTimeoutMS));\n\n return Promise.race([checkPromise, timeoutPromise]);\n};\n\nconst getPlatformUrl = async (config: WebWorkerConfig): Promise => {\n if (config.platform?.url) {\n const url = config.platform.url.split(\"?\")[0].split(\"#\")[0];\n console.debug(`getting url from config: ${url}`);\n return trimUrlQueryHashAndTrailingSlash(url);\n }\n\n console.debug(\"starting the db\");\n const db = await startDb();\n\n if (!db.objectStoreNames.contains(\"serviceWorker\")) {\n console.warn(\"there is no service worker store\");\n return;\n }\n\n const workerData = await db.get(\"serviceWorker\", \"workerData\");\n\n const url = workerData?.platformUrl?.split(\"?\")[0].split(\"#\")[0];\n\n return trimUrlQueryHashAndTrailingSlash(url);\n};\n\nconst validateConfig = (config: WebWorkerConfig = {}): WebWorkerConfig => {\n const validated: WebWorkerConfig = webWorkerConfigDecoder.runWithException(config);\n\n if (validated.platform?.url) {\n validated.platform.url = validated.platform.url.replace(/\\/$/, \"\");\n }\n\n return validated;\n};\n\nexport const raiseIONotification = async (settings: any): Promise => {\n\n const options = Object.assign({}, settings, { title: undefined, clickInterop: undefined, actions: undefined });\n\n options.actions = settings.actions?.map((action: any) => {\n return {\n action: action.action,\n title: action.title,\n icon: action.icon\n };\n });\n\n const glueData = {\n clickInterop: settings.clickInterop,\n actions: settings.actions,\n id: nanoid()\n };\n\n if (options.data) {\n options.data.glueData = glueData;\n } else {\n options.data = { glueData };\n }\n\n return (self as any).registration.showNotification(settings.title, options);\n};\n\nexport const openBrowserPlatform = (url: string): Promise => {\n return new Promise((resolve, reject) => {\n\n if (!url) {\n return reject(\"Cannot open the platform, because a url was not provided\");\n }\n\n const channel = new BroadcastChannel(serviceWorkerBroadcastChannelName);\n\n const openHandler = function (event: any): void {\n const data = event.data;\n\n if (data.platformStarted) {\n channel.removeEventListener(\"message\", openHandler);\n resolve();\n }\n };\n\n channel.addEventListener(\"message\", openHandler);\n\n (self as any).clients.openWindow(url).catch(reject);\n\n setTimeout(() => reject(`Timed out waiting for the platform to open and send a ready signal: ${platformOpenTimeoutMS} MS`), platformOpenTimeoutMS);\n });\n};\n\nexport const focusCorePlatform = async (url: string): Promise => {\n if (!url) {\n console.warn(\"Cannot open the platform, because a url was not provided\");\n return;\n }\n\n const allWindows = await (self as any).clients.matchAll({ type: \"window\" });\n\n for (const client of allWindows) {\n\n const urlStrippedQueryHash = client.url.split(\"?\")[0].split(\"#\")[0];\n const urlStrippedTrailingSlash = urlStrippedQueryHash.replace(/\\/$/, \"\");\n\n if (urlStrippedTrailingSlash === url) {\n\n await client.focus();\n return;\n }\n }\n};\n\nexport const setupCore: IOConnectWebWorkerFactoryFunction = (config?: WebWorkerConfig): void => {\n const verifiedConfig = validateConfig(config);\n\n self.addEventListener(\"notificationclick\", (event: any) => {\n let isPlatformOpen: boolean;\n\n const channel = new BroadcastChannel(serviceWorkerBroadcastChannelName);\n\n console.debug(\"Received a notification, checking if the platform is open\");\n\n const executionPromise = checkPlatformOpen()\n .then((platformExists: boolean) => {\n\n isPlatformOpen = platformExists;\n\n console.debug(`The platform is: ${isPlatformOpen ? \"open\" : \"not open\"}`);\n\n const action = event.action;\n\n if (!action && verifiedConfig.notifications?.defaultClick) {\n console.debug(\"Calling a defined default click handler\");\n return verifiedConfig.notifications.defaultClick(event, isPlatformOpen);\n }\n\n if (action && verifiedConfig.notifications?.actionClicks?.some((actionDef) => actionDef.action === action)) {\n const foundHandler = verifiedConfig.notifications.actionClicks.find((actionDef) => actionDef.action === action).handler;\n console.debug(`Calling a defined action click handler for action: ${action}`);\n return foundHandler(event, isPlatformOpen);\n }\n })\n .then(() => {\n console.debug(\"Getting the platform url\");\n return getPlatformUrl(verifiedConfig);\n })\n .then((url) => {\n\n console.debug(`Found platform url: ${url}`);\n\n if (!isPlatformOpen && verifiedConfig.platform?.openIfMissing) {\n console.debug(\"Opening the platform\");\n return openBrowserPlatform(url);\n }\n\n const focusOnClick = (event as any).notification.data?.glueData?.focusPlatformOnDefaultClick;\n\n if (isPlatformOpen && focusOnClick) {\n console.debug(\"Focusing the platform\");\n return focusCorePlatform(url);\n }\n })\n .then(() => {\n const messageType = \"notificationClick\";\n\n const action = (event as any).action;\n const glueData = (event as any).notification.data.glueData;\n\n const definition = {\n badge: (event as any).notification.badge,\n body: (event as any).notification.body,\n data: (event as any).notification.data,\n dir: (event as any).notification.dir,\n icon: (event as any).notification.icon,\n image: (event as any).notification.image,\n lang: (event as any).notification.lang,\n renotify: (event as any).notification.renotify,\n requireInteraction: (event as any).notification.requireInteraction,\n silent: (event as any).notification.silent,\n tag: (event as any).notification.tag,\n timestamp: (event as any).notification.timestamp,\n vibrate: (event as any).notification.vibrate\n };\n\n channel.postMessage({ messageType, action, glueData, definition });\n })\n .catch((error) => {\n const stringError = typeof error === \"string\" ? error : JSON.stringify(error.message);\n channel.postMessage({ messageType: \"notificationError\", error: stringError });\n });\n\n event.waitUntil(executionPromise);\n });\n\n self.addEventListener(\"notificationclose\", (event: any) => {\n const channel = new BroadcastChannel(serviceWorkerBroadcastChannelName);\n\n console.debug(\"Received a notification close event, checking if the platform is open\");\n\n const executionPromise = checkPlatformOpen()\n .then((platformExists: boolean) => {\n\n console.debug(`The platform is: ${platformExists ? \"open\" : \"not open\"}`);\n\n if (!platformExists) {\n console.log(\"The platform is not opened and will not open it for a notification close event\");\n return;\n }\n\n const messageType = \"notificationClose\";\n\n const action = (event as any).action;\n const glueData = (event as any).notification.data.glueData;\n\n const definition = {\n badge: (event as any).notification.badge,\n body: (event as any).notification.body,\n data: (event as any).notification.data,\n dir: (event as any).notification.dir,\n icon: (event as any).notification.icon,\n image: (event as any).notification.image,\n lang: (event as any).notification.lang,\n renotify: (event as any).notification.renotify,\n requireInteraction: (event as any).notification.requireInteraction,\n silent: (event as any).notification.silent,\n tag: (event as any).notification.tag,\n timestamp: (event as any).notification.timestamp,\n vibrate: (event as any).notification.vibrate\n };\n\n channel.postMessage({ messageType, action, glueData, definition });\n })\n .catch((error) => {\n const stringError = typeof error === \"string\" ? error : JSON.stringify(error.message);\n channel.postMessage({ messageType: \"notificationError\", error: stringError });\n });\n\n event.waitUntil(executionPromise);\n });\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { setupCore, openBrowserPlatform, raiseIONotification } from \"./worker\";\n\nif (typeof self !== \"undefined\") {\n (self as any).IOWorker = setupCore;\n (self as any).openBrowserPlatform = openBrowserPlatform;\n (self as any).raiseIONotification = raiseIONotification;\n}\n\nexport { openBrowserPlatform, raiseIONotification } from \"./worker\";\n\nexport default setupCore;\n"],"names":[],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAqDA;IACO,SAAS,SAAS,CAAC,OAAO,EAAE,U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